开发者

Load image using referrer header

I'm trying to load an image dynamically. Seems like t开发者_开发百科he server doesn't like me loading that image outside form their domain, so I always get with a 404, when in fact Firebug seems to load it and FF as well.

What's the best approach to remove the referrer header from the GET request sent to the server via the browser? I was thinking about a PHP proxy, but I will be happy if I can accomplish this using JavaScript.

I'm using Mootools.


You cannot do this with JavasSript because it is a violation of the same origin policy. Checking the referer is a good method for preventing bandwidth theft and thats one of its few good security uses. If an attacker controls the browser the referer and the rest of the HTTP Header can be controlled with TamperData. If all of thoughs jpg's are killing your $4/mo unlimited bandwidth from some random shared host, perhaps a free image host will fill your needs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜