-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[BUG] cors middleware will add multiple headers when used with Party #2490
Comments
Additional Info:
//cors
crs := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"PUT", "PATCH", "GET", "POST", "OPTIONS", "DELETE"},
AllowedHeaders: []string{"*"},
ExposedHeaders: []string{"*"},
AllowCredentials: true,
MaxAge: int((24 * time.Hour).Seconds()),
Debug: true,
}) NO OPTIONS is allowed to the v1 routs: app := iris.Default()
...
app.UseRouter(crs)
...
v1 := app.Party("/v1").AllowMethods(iris.MethodOptions)
v1.UseRouter(crs) // same behavior for v1.Use(crs)
... same here: app := iris.Default()
...
app.UseRouter(crs)
...
v1 := app.Party("/v1").AllowMethods(iris.MethodOptions)
... This gives a 204 for options. app := iris.Default()
...
v1 := app.Party("/v1").AllowMethods(iris.MethodOptions)
v1.UseRouter(crs) // same behavior for v1.Use(crs)
... |
@Dexus below is the Lines 139 to 145 in d5e0048
|
@fnsne problem is that even if I use |
@Dexus It seems strange, and I'm unsure why it happend. |
https://github.com/iris-contrib/middleware/blob/master/cors/cors_test.go
only difference is that I use a Party
The text was updated successfully, but these errors were encountered: