jQuery, CORS, JSON (without padding) and authentication issues

前端 未结 3 587
滥情空心
滥情空心 2021-01-14 02:45

I have two domains. I\'m trying to access a JSON object from one domain through a page on another. I\'ve read everything I could find regarding this issue, and still can\'t

3条回答
  •  一向
    一向 (楼主)
    2021-01-14 03:14

    Why don't you try typing the URL you are fetching the JSON from into your browser and seeing what happens. It sounds like you literally just need to authenticate into this other website to access it.

    If your site needs to work in other browsers like IE, you WILL need JSONP, by the way. The security won't allow the cross site request to work. The headers won't change that. I believe you will also need to add a security policy in your headers.

提交回复
热议问题