Is an AJAX call cross-domain if only the port is different?

我是研究僧i 提交于 2019-12-22 03:16:12

问题


The main page is www.myserver.com:80 and the ajax references www.myserver.com:8081.

The status code is 0 and the text is null. Is this a cross domain denial?


回答1:


Yes, this violates the same origin policy.




回答2:


Yeah, different port is also considered as a cross domain call. Please refer here.



来源:https://stackoverflow.com/questions/3087215/is-an-ajax-call-cross-domain-if-only-the-port-is-different

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!