How can I set rel=noreferrer in a URLRequest in Flash
I'm using a URLRequest to get a resource. I need to clear the Referrer information in the request. Is there a way to do this?
Snippet:
sound = new Sound();
var req:URLRequest = new URLRequest(url);
req.method = "POST";
req.requestHeader开发者_Python百科s = new Array(new URLRequestHeader("Referrer", ""));
sound.load(req);
According to the ActionScript docs, there is a list of blacklisted header attributes that can't be modified. So I just set up a proxy for the request and modify the header there.
There is that old HTML trick to remove referrer header from requests using data:
:
<iframe src='data:text/html,<object type="application/x-shockwave-flash" data="[flash_file_url]"></object>'></iframe>
精彩评论