In blazor client app I want to make call to external API based on ntrada. I want to send DELETE request but httpClient sends preflight OPTIONS request. In response from API I get:
HTTP/1.1 405 Method Not Allowed
Connection: close
Date: Sun, 22 Mar 2020 10:00:31 GMT
Server: Kestrel
Content-Length: 0
Allow: DELETE
httpClient exception:
Access to fetch at 'http://localhost:5000/smth/e928eade-cd49-4bfa-b36a-5b0a7839b279' from origin 'https://localhost:4999' has been blocked by CORS policy: Method DELETE is not allowed by Access-Control-Allow-Methods in preflight response.
Shouldn't status code 200 be returned in this case?
In blazor client app I want to make call to external API based on ntrada. I want to send DELETE request but httpClient sends preflight OPTIONS request. In response from API I get:
httpClient exception:
Shouldn't status code 200 be returned in this case?
My route config is:
I tried to allow OPTIONS methods in that way:
but it occurred in exception:
I also tried set
forwardStatusCode
to false but even then I got 405 instead of 200.