-
Notifications
You must be signed in to change notification settings - Fork 186
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
It's not work when the server redirect 301. #56
Comments
this same problem using |
@Louis-Amas I almost forget this issue, I just changed my client request to sth like .../v1/foo/ |
Id didnt work out. I did this according to your recommendation, but client side still throws CORS error. |
It is not caused by gin-contrib/cors, it's caused by gin. |
just in case you write '/' in the end of your url at golang server ( like /v1/foo/). If you don't write it (like /v1/foo ), don't add '/' on your request url. |
You may want to check this answer gin-gonic/gin#1216 ... router := gin.New()
friend := router.Group("/friend")
{
friend.GET("/", controller.GetFirends)
}
|
I think the issue persist even setting specific route to My workaround: duplicate routes
So even if you call |
It's ok when it return 200. but when the server return 301, cors not working.
The text was updated successfully, but these errors were encountered: