通过Portal的CosmosDB和CORS损坏了吗?

时间:2019-12-17 14:22:35

标签: azure-cosmosdb

我正在尝试在本地使用活跃的CosmosDB进行开发。我尝试将我的本地IP /域以及通配符*添加到CosmosDB的CORS部分中,但没有成功。

我还导出了资源模板,发现清单中没有CORS属性。

CORS错误如下:
在Chrome中:Access to fetch at 'https://--.documents.azure.com/' from origin 'https://localhost:8080' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
在Firefox中:Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://--.documents.azure.com/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

我成功从本地“来源”中将CORS与功能一起使用。

0 个答案:

没有答案