We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey, I am trying to figure out, how to handle CORS, especially the OPTIONS preflight.
I tried to implement middleware that returns HTTP.StatusNoContent if an OPTIONS call is being made, but I always get a 405.
The framework is not processing the request as there is no such route.
What is the general approach to handling CORS?
Best - Alex
The text was updated successfully, but these errors were encountered:
Use rest.WithCors, rest.WithCorsHeaders or rest.WithCustomCors.
rest.WithCors
rest.WithCorsHeaders
rest.WithCustomCors
Sorry, something went wrong.
@kevwan, thanks a lot! I think this should be documented somewhere.
https://go-zero.dev/faq/http/cors
No branches or pull requests
Hey, I am trying to figure out, how to handle CORS, especially the OPTIONS preflight.
I tried to implement middleware that returns HTTP.StatusNoContent if an OPTIONS call is being made, but I always get a 405.
The framework is not processing the request as there is no such route.
What is the general approach to handling CORS?
Best - Alex
The text was updated successfully, but these errors were encountered: