首页 新闻 会员 周边 捐助

netcore网站使用apigateway时出现问题

0
悬赏园豆:20 [已关闭问题] 关闭于 2019-11-01 14:00

netcore:2.2

configuration.json中配置

复制代码
    {
      "DownstreamHostAndPorts": [
        {
          "Host": "xxxx",
          "Port": 80
        }
      ],
      "DownstreamPathTemplate": "/api/{url}",
      "DownstreamScheme": "http",
      "UpstreamHttpMethod": [ "Get", "Post", "OPTIONS" ],
      "UpstreamPathTemplate": "/cruise/{url}",
      "UseServiceDiscovery": true
    },
复制代码

将netcore网站发布到iis网站中,已设置无托管代码

在实际使用时,发送一个options请求

win 10电脑(没有安装360,谷歌最新版浏览器)  访问无任何问题

 

 

win7电脑(安装360,谷歌最新版浏览器)出现跨域问题





Access to XMLHttpRequest at 'http://gateway.api.xxx.com/cruise/xxxx' from origin 'http://www.xxxx.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

 

请问问题出现在何处,有无解决方向

spatxos的主页 spatxos | 初学一级 | 园豆:32
提问于:2019-11-01 13:23
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册