具有相同域的同源策略,但 https [英] Same origin policy with same domain, but https

查看:68
本文介绍了具有相同域的同源策略,但 https的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 http://www.somedomain.com 到 https://www.somedomain.com

不用麻烦地设置测试,有人可以确认这是否会被视为同源吗?

我的假设是这没问题,因为在这种情况下 cookie 已成功共享.

解决方案

不行,url 需要相同的域和相同的协议,请参阅 http://en.wikipedia.org/wiki/Same_origin_policy

I'd like to make a web service call from http://www.somedomain.com to https://www.somedomain.com

Without going to the trouble of setting up a test, could someone confirm if this will be considered the same origin?

My assumption is that this will be fine, seeing as cookies are shared successfully in this situation.

解决方案

No, it wont work the url needs the same domain and the same protocol see http://en.wikipedia.org/wiki/Same_origin_policy

这篇关于具有相同域的同源策略,但 https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆