如何禁用CORS策略 [英] How to disable CORS policy

查看:1370
本文介绍了如何禁用CORS策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

在使用文本分析API时出现以下错误。

Getting the following error when consuming the text analytics api.

访问https:/访问XMLHttpRequest来自origin'http:// localhost:3000'的/australiaeast.api.cognitive.microsoft.com/text/analytics/v2.0'已被CORS策略阻止:没有'Access-Control-Allow-Origin'标头存在在请求的资源上。

Access to XMLHttpRequest at 'https://australiaeast.api.cognitive.microsoft.com/text/analytics/v2.0' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

知道如何禁用CORS政策吗?

Any idea how to disable to the CORS policy?

最好的问候

Calvin

Best regards
Calvin

推荐答案

由于您刚刚提到"禁用CORS政策"的原因很多,我建议您参考以下帖子:  https:// stackoverflow.com/questions/43871637/no-access-control-allow-origin-header-is-present-on-the-requested-resource-whe

Since there are a lot of reasons when you just mentioned "Disable CORS policy", I would like to suggest you referring to the following post: https://stackoverflow.com/questions/43871637/no-access-control-allow-origin-header-is-present-on-the-requested-resource-whe

它应该包含你想要的一切。

It should contain everything you want.

问候,

宇通


这篇关于如何禁用CORS策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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