来自localhost的客户端:8880从localhost:8880调用服务器,但仅支持交叉源请求

时间:2016-08-18 13:23:38

标签: http angular cross-domain

我在url上有一个带有angular2的html页面:

http://localhost:8880/SupporTool/html/angular2/index.html#

上调用服务器

localhost:8880/SupporTool/Push/SelectMessagesAttributes

我怎么来

Cross origin requests are only supported..

enter image description here

1 个答案:

答案 0 :(得分:0)

必须在Chrome中停用相同的来源政策。它会阻止从localhost到自身的所有调用。

使用--disable-web-security标志启动chrome