I have 2 applications running on the same machine:
我在同一台机器上运行了2个应用程序:
- node.js app running on port 15000
- node.js app在端口15000上运行
- a full javascript application running on port 15001
- 在端口15001上运行的完整JavaScript应用程序
Both are served through nginx front end (each app defined as a virtual host)
两者都通过nginx前端提供(每个应用程序定义为虚拟主机)
Ajax requests from the javascript app (requesting resources from the node.js app) are not working.
来自javascript应用程序的Ajax请求(从node.js应用程序请求资源)无效。
Is this linked to restriction of Ajax for cross domain ? The domain is the same (only the port are differents).
这与跨域的Ajax限制有关吗?域是相同的(只有端口是不同的)。
Any idea ?
任何想法 ?
2 个解决方案
#2
0
Yes, limiting requests on same domain to different port
是的,将同一域上的请求限制到不同的端口
Same origin policy
同源政策
https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript
http://en.wikipedia.org/wiki/Same_origin_policy
https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript http://en.wikipedia.org/wiki/Same_origin_policy
#1
#2
0
Yes, limiting requests on same domain to different port
是的,将同一域上的请求限制到不同的端口
Same origin policy
同源政策
https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript
http://en.wikipedia.org/wiki/Same_origin_policy
https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript http://en.wikipedia.org/wiki/Same_origin_policy