How to get "HTTP_REFERER" with NodeJS?


Question

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

1
48
5/14/2012 8:41:38 AM

Accepted Answer

You can get it by...

req.headers.referer

in...

var http = require('http');
server = http.createServer(function(req, res){
...
}
81
6/21/2016 3:26:27 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon