New issue
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
Middleware doesn't apply to Redirect #1985
Comments
Same here did you find a fix? |
My solution is not using api group for |
Try to use this code. |
still have this problem. |
rg.GET("/", func(c *gin.Context) {
_url := strings.TrimRight(c.Request.URL.Path, "/") + "?" + c.Request.URL.RawQuery
c.Redirect(301, _url)
}) it's ugly, but it works |
Any updates on this issue? |
Raised a fix here - #3858 You can directly start using it in your project by running this
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's sample code:
Here's normal response with CORS headers.
But my CORS header doesn't apear in the 301 redirect response
The text was updated successfully, but these errors were encountered: