local AJAX-call to remote site works in Safari but not in other browsers

后端 未结 4 956
日久生厌
日久生厌 2020-12-19 04:54

I am maintaining a website that uses Javascript. The script uses jQuery and loads some content from the server at which the site is normally hosted.

Just for conveni

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 05:41

    CHROME

    There is a plugin for chrome that will force it to ignore the security policy. You can also do this with flags. Note, please do not browse the "real web" with this enabled as it is a security risk for your computer.

    FIREFOX

    This thread indicates that there is presently no way to do this in firefox.

    OPERA

    Again, there does not appear to be a built in way to ignore CORS policies.

    The alternative would be to have the server (http://my.domain.tld) in your case return the proper headers - specifically Access-Control-Allow-Origin:

提交回复
热议问题