在同一台服务器上的不同端口视为跨域? (阿贾克斯明智) [英] Are different ports on the same server considered cross-domain? (Ajax-wise)

查看:2124
本文介绍了在同一台服务器上的不同端口视为跨域? (阿贾克斯明智)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以XMLHtt prequest请求发送到http:// mydomain.com:81/从http:// mydomain.com/

Can XMLHttpRequest send a request to http:// mydomain.com:81/ from http:// mydomain.com/ ?

推荐答案

有关两个文件被认为具有相同的起源,协议(HTTP / HTTPS),域和端口(默认80:XX)必须张玉峰。 所以,不,你不能使用XHR针对不同的端口。

For two documents to be considered to have the same origin, the protocol (http/https), the domain and the port (the default 80 or :xx) have to be indentical. So no, you cannot use xhr against a different port.

这篇关于在同一台服务器上的不同端口视为跨域? (阿贾克斯明智)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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