Skip to content

Commit

Permalink
driver: Add "Content-Type" to default allowed cors headers
Browse files Browse the repository at this point in the history
Closes #1421
  • Loading branch information
aeneasr authored May 6, 2019
1 parent fa10d9d commit 45bd863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/configuration/provider_viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (v *ViperProvider) CORSOptions(iface string) cors.Options {
return cors.Options{
AllowedOrigins: viperx.GetStringSlice(v.l, "serve."+iface+".cors.allowed_origins", []string{}, "CORS_ALLOWED_ORIGINS"),
AllowedMethods: viperx.GetStringSlice(v.l, "serve."+iface+".cors.allowed_methods", []string{"GET", "POST", "PUT", "PATCH", "DELETE"}, "CORS_ALLOWED_METHODS"),
AllowedHeaders: viperx.GetStringSlice(v.l, "serve."+iface+".cors.allowed_headers", []string{"Authorization"}, "CORS_ALLOWED_HEADERS"),
AllowedHeaders: viperx.GetStringSlice(v.l, "serve."+iface+".cors.allowed_headers", []string{"Authorization", "Content-Type"}, "CORS_ALLOWED_HEADERS"),
ExposedHeaders: viperx.GetStringSlice(v.l, "serve."+iface+".cors.exposed_headers", []string{"Content-Type"}, "CORS_EXPOSED_HEADERS"),
AllowCredentials: viperx.GetBool(v.l, "serve."+iface+".cors.allow_credentials", true, "CORS_ALLOWED_CREDENTIALS"),
OptionsPassthrough: viperx.GetBool(v.l, "serve."+iface+".cors.options_passthrough", false),
Expand Down

0 comments on commit 45bd863

Please sign in to comment.