You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why do you believe this is a CORS issue? The client did make the request to the gateway.
Judging by the logs, YARP forwarded the GET request to the backend service (https://localhost:64660/v1/xxx/yyy), and it responded with a 405. Are you sure that the client is using the correct method for this request?
I would recommend looking at the logs in the backend service to see why it decided to reject the request.
Why do you believe this is a CORS issue? The client did make the request to the gateway.
Judging by the logs, YARP forwarded the GET request to the backend service (https://localhost:64660/v1/xxx/yyy), and it responded with a 405. Are you sure that the client is using the correct method for this request? I would recommend looking at the logs in the backend service to see why it decided to reject the request.
You were completely correct, it ended up being a HTTP verb change that was missed when I replaced the legacy API gateway.
Describe the bug
I have created an API gateway with YARP and have a couple of downstream APIs.
The problem I am facing is that when running locally, my web client app calls the API gateway, I am getting:
https://localhost:64540/xxx/v1/yyy/zzz 405 (Method Not Allowed)
I have researched this as much as possible and have found a handful or blogs e.g. https://blog.agchapman.com/bypassing-cors-with-yarp-proxy/ but I cannot seem to rectify this CORS issue.
Output from API gateway HTTP logging:
I have the following code configuration implemented on the API gateway project:
Program.cs
Extension method to add YARP to servicecollection:
Custom YarpService class
To Reproduce
Further technical details
The text was updated successfully, but these errors were encountered: