Internet Explorer http referer issue

前端 未结 6 803
孤独总比滥情好
孤独总比滥情好 2020-12-06 03:26

it seems I have run into a problem with Internet Explorer 7. I have an html page that has links to files on another server. The server I am linking to checks the referrer of

6条回答
  •  有刺的猬
    2020-12-06 03:54

    You may want to use a different mechanism anyway. Referrers are easily spoofed. Checking referrers really isn't a good security solution, and if they're going to cause you headaches like this, maybe you want to find another way.

    For example, the server generating the first page could add an authorization token to the URLs to the second server, and the second server could check that the tokens are valid. This way, all of the details are under your control, and the only browser behavior you're counting on is that the full URL is sent to the second server.

提交回复
热议问题