Switch on CORS by default if not specified (#928)
This commit is contained in:
1 parent
433998494a
commit
e9da3a871d
9 files changed
+62
-23
No files matched your search
@@ -260,7 +260,7 @@ func wrapHandlerWithCors(h http.Handler, props HandlerProperties) http.Handler {
|
||||
}, props.ListenerConfig.CorsAllowedHeaders...)
|
||||
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
if !props.ListenerConfig.CorsEnabled {
|
||||
if props.ListenerConfig.CorsEnabled == nil || !*props.ListenerConfig.CorsEnabled {
|
||||
h.ServeHTTP(w, req)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user