express get request origin

JavaScript
app.use((req, res, next) => {
  const host = req.get('host');
  const origin = req.get('origin');
});
Source

Also in JavaScript: