How can I set rel=noreferrer in a URLRequest in Flash

858 views Asked by At

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.requestHeaders = new Array(new URLRequestHeader("Referrer", ""));
        sound.load(req);
2

There are 2 answers

0
wildabeast On BEST ANSWER

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.

0
user00239123 On

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>