exports.checkReferer = function(req) {
if (!req.headers.referer) {
return false;
}
var parsedReferer = url.parse(req.headers.referer);
var finalReferer = parsedReferer.hostname;
finalReferer += (parsedReferer.port ? ':' + parsedReferer.port : '');
Message too long. Click here to view full text.