我在.Net核心3.1中有一个Azure函数应用程序,实现Swagger。Swagger页面按预期工作。Ensure you have CORS enabled on the endpoint and are calling a valid HTTPS endpoint.我尝试了以下网址:我已经在函数应用程序中启用了CORS,但是我不知道如何为允许的起源使用什么。
在我的机器上运行应用程序时,我会得到CORS错误,但是当运行完全相同的代码时,同事就不会这样做了。
下面是我的设置:在https://localhost:1234上运行一个React前端。它需要与运行在端口https://localhost:7047上的DotNet6API对话。(Reason: CORS request did not succeed). Status code: (null).(Reason: CORS request did not succeed). Stat