Flash in Firefox does not send the HTTP REFERER value
Asked Answered
S

1

6

In IE and Chrome, if your swf object requests a url (mp3 file for example) it will also pass the HTTP_REFERER in the request. The HTTP_REFERER will be the url of the swf object.

This does not happen in Firefox. The HTTP_REQUEST is always empty.

Is this some option in the swf code, bug in flash or limitation of the browser? And is there a way to overcome this?

Thanks in advance.

Samualsamuel answered 16/2, 2011 at 8:58 Comment(3)
I think there is no workaround. I have seen people adding the current page's URL to a separate parameter insteadSpangle
This bug has been active on bugzilla for three years. :( bugzilla.mozilla.org/show_bug.cgi?id=410904Romanticism
Completely screws up hot-link/leech protection on some hosts. That should really be looked into.Meanwhile
C
3

Same problem here, After some research it appears to be a 3 years old bug from mozilla as stated before by @Amalgovinus.

We found a solution for this perform a POST request instead of a GET request inside the flash. You must also pass a faked data as flash will automaticly change your POST request to a GET if there's no datas to send along the request here's a flash code sample to make this work:

var url = "http://exemple.com/myNotHotlinkedSong.mp3";
var myRequest:URLRequest = new URLRequest (url);
myRequest.method = URLRequestMethod.POST;
// add some data to the request to force the use of POST inside flashPlayer
myRequest.data = "fake=fake";

We're now happy to be able to use our .htaccess to avoid hotlinking even in FF, hope others will find this helpfull.

Commando answered 24/8, 2011 at 14:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.