I\'m using express.js and i need to know the domain which is originating the call. This is the simple code
app.get(
\'/verify_license_key.json\',
fun
Recently faced a problem with fetching 'Origin' request header, then I found this question. But pretty confused with the results, req.get('host')
is deprecated, that's why giving Undefined
.
Use,
req.header('Origin');
req.header('Host');
// this method can be used to access other request headers like, 'Referer', 'User-Agent' etc.