Answer the question
In order to leave comments, you need to log in
Is it possible to change the HTTP referer?
Hello, the essence of the question is, is it possible to change the HTTP referer to load another URL via iframe?
There is a link to the player, but this player can only be displayed on a specific site, for example foo.com, that is, as I understand it, there is a check just by referer, if the referer is allowed, then the player is displayed, otherwise not. Can I change the referer when loading an iframe on my site? If yes, how to do it? Already googled all over, nothing specific. Tried like this:
Object.defineProperty(document, "referrer", {get : function(){ return "НОВЫЙ REFERE"; }});
Answer the question
In order to leave comments, you need to log in
I don’t know how to change it on the client, but you can make a proxy on nginx, replace the referrer there and frame this proxy.
location /test/ {
proxy_pass https://www.whatismyreferer.com/;
proxy_set_header Referer "https://yandex.ru";
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question