使用 ServiceStacks JsonServiceClient 时的 Cors 配置问题
Cors configuration issues when using ServiceStacks JsonServiceClient
我在尝试使用 ServiceStack 的 JsonServiceClient Post 数据到我的 API 时遇到问题。
我在控制台中收到以下错误消息
访问“https://192.168.10.191:5001/json/reply/CreateEquipment' from origin 'http://192.168.10.191:5000”已被 CORS 策略阻止:Access-Control-Allow-Headers 在预检响应中不允许请求 header 字段 headers。
我已将 192.168.10.191:5000 添加到白名单。
我可以在网络选项卡中看到它尝试访问“https://192.168.10.191:5001/json/reply/CreateEquipment”,但是当我使用 fiddler 捕获流量时没有任何显示。
我附上了 header 的图片。 https://i.stack.imgur.com/hUfII.png
您在 5001 端口请求 https 资源,但您的来源白名单 returns 是 http 5000 资源,它们需要匹配。
我在尝试使用 ServiceStack 的 JsonServiceClient Post 数据到我的 API 时遇到问题。
我在控制台中收到以下错误消息
访问“https://192.168.10.191:5001/json/reply/CreateEquipment' from origin 'http://192.168.10.191:5000”已被 CORS 策略阻止:Access-Control-Allow-Headers 在预检响应中不允许请求 header 字段 headers。
我已将 192.168.10.191:5000 添加到白名单。
我可以在网络选项卡中看到它尝试访问“https://192.168.10.191:5001/json/reply/CreateEquipment”,但是当我使用 fiddler 捕获流量时没有任何显示。
我附上了 header 的图片。 https://i.stack.imgur.com/hUfII.png
您在 5001 端口请求 https 资源,但您的来源白名单 returns 是 http 5000 资源,它们需要匹配。