How to enable CORS in asp.net core?

  • 0
    I enabled CORS on the asp.net core server, but it still doesn't want to process requests from my browser, but everything works fine in Postman.
    Maybe someone came across a similar problem and knows its solutions, please help me for 2 days now I have been suffering with this problem.



    JavaScript Charles Christensen, Jan 9, 2020

  • 1 Answers
  • 0
    Redirect is not allowed for a preflight request.


    Probably the problem is that you are returning a redirect.

    You can try adding /
    at the end of the address first.
    Well, if it doesn't help, look at the Network tab and find out where you are being redirected and why.

    Another option is that you access http, and the service redirects you to https
    Eli Noble

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!