There is a way to bypass the referrer checking of a website? With nodeJS like a proxy or something like this?
For info, I must play some media on a server but this server check the referrer for a specific value, if the value is not here, it redirect me on a 404.
For my personal learning, I would like find a solution with nodeJS without installing a plugin on the browser. I already done that on developing an extension (WebExtension API) to rewrite the request headers and add referrer value.
Thanks
UPDATE Here is an example code of what I doing now. The console.log show me the added request but not Chrome inspector.
var http = require('http');
var httpProxy = require('http-proxy');
var express = require('express');
var app = express();
var url = "http://localhost:3001"; // create target server for testing
var proxy = httpProxy.createProxyServer();
// simple url
app.all("/radio/*", function(req, res) {
req.headers['referer'] = 'http://new-referer-url';
proxy.web(req, res, {
target: url,
headers: req.headers
});
console.log(req.headers); // the request is passed here but not in Chrome inspector
});
app.listen(3000);