Enkows Enkows - 5 months ago 20
Node.js Question

How to get "HTTP_REFERER" with NodeJS?

A way to get

HTTP_REFERER
, We can use
document.referrer
in browser side javascript .
But how can we get it in NodeJS ?

Answer

You can get it by...

req.headers.referer

in...

var http = require('http');
server = http.createServer(function(req, res){
...
}
Comments