ASP.NET Core CORS request blocked; why doesn't my API apply the right headers?

前端 未结 4 1491
粉色の甜心
粉色の甜心 2021-01-02 10:26

Trying to set up CORS with authentication. I have a Web API site up at http://localhost:61000 and a consuming web application up at http://localhost:62000. In the Web API S

4条回答
  •  [愿得一人]
    2021-01-02 11:09

    ASP.NET Core 2.2.0 Answer

    This issue is now fixed. CORS headers are now returned even when exceptions are thrown and a 500 response is returned.

    ASP.NET Core <= 2.1.0 Answer

    CORS Headers were stripped from the response when an exception is thrown and a 500 response is returned.

提交回复
热议问题