Changing the http referer in javascript

2020-02-11 04:35发布

I have an image

<image src="blah.com/image.gif"/>
. when the image loads, is there a way to change the http referer to X so that the src host sees the http referer of the image request coming from X?

标签: http
1条回答
成全新的幸福
2楼-- · 2020-02-11 05:07

It's not possible to change the referrer of an image request load but is possible to remove the referrer.

There is a cross browser solution in Javascript, it uses Iframes created dynamically, check a proof of concept ( disclaimer: It uses a little JS lib I coded for that purpose).

查看更多
登录 后发表回答