Search code examples
flashactionscript-3referrerurlrequest

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

Solution

  • 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.