开发者

Ajax post via https from an http page

开发者 https://www.devze.com 2022-12-17 09:51 出处:网络
I have an ajax call that really needs to be https. However, the page that it is being called from is http.开发者_运维技巧 The browser complains about restricted URI denied, presumably due to the same

I have an ajax call that really needs to be https. However, the page that it is being called from is http.开发者_运维技巧 The browser complains about restricted URI denied, presumably due to the same origin policy. Are there any known workaround for this?


Yes, that's same-origin policy stopping you. You have to use same workarounds as for cross-domain requests.

Requests from non-secure website are not secure, even if you're making requests to HTTPS URLs (because MITM attack can replace all "https" with "http"), so you should consider using HTTPS for the whole page.

0

精彩评论

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

关注公众号