Replies: 1 comment
-
IIS side CORS settings require the out-of-band CORS module, so you might configure that as well |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone in this moment I have a problem with the CORS policy, I created the API in .NET 7.0.400 and when I run the API on localhost the CORS works perfectly but when I publish my API in a server IIS the CORS doesn't work.
I have readed the official documentation of Microsoft
https://learn.microsoft.com/en-us/aspnet/core/security/cors?view=aspnetcore-3.1#enable-cors
and have followed the steps that they said but I have not any result. Also I procedure to enable CORS in IIS and in my web.config I put the CORS policy, like that
the CORS policy that I create is this
and this is the order of my middlewares, according of this documentation
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-7.0#middleware-order
Exist something more that I shoulded to configure in my API for CORS policy works when I publish it?
Beta Was this translation helpful? Give feedback.
All reactions