In this article, I will discuss about the error message that you might found when calling a CORS protected .NET Core Api. The following is the full error message:
1 2 3 | Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access. The response had HTTP status code 405. |
How to Fix Error No ‘Access-Control-Allow-Origin’ 1. Allow Method “Options” A preflight request is one that the browser sends to see if the CORS settings […]