我在下面被问了一个问题,却找不到答案。我查阅了类似的帖子,但许多帖子(如这)最终都谈到了跨源,而不是跨域。以下问题的答案是什么?
问:假设你正在http://example.com/path/to/foo.html的网页上工作。如果要向以下URL发送AJAX请求,哪个URL不会触发跨域冲突?
答:http://example.com/bar
B:https://example.com/path/to/bar.html
C:https://example.com:80/bar
D:http://www.example.com/bar
E:C and D
提前谢谢你。
更新:最初,我看到一个网站说there is a 'Cross-domain violation' which is different from 'CORS' since 'origin' and 'domain' points different part.,这就是为什么我一直在寻找'cross-domain violation'的定义。但正如下面的答案所示,这实际上与“同源政策”是一样的。
https://stackoverflow.com/questions/70704965
复制相似问题