Merge pull request #6355 from owncloud/fix-cors-headers
fix preflight requests
This commit is contained in:
@@ -52,7 +52,7 @@ func Authentication(auths []Authenticator, opts ...Option) func(next http.Handle
|
||||
return func(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ri := router.ContextRoutingInfo(r.Context())
|
||||
if isOIDCTokenAuth(r) || ri.IsRouteUnprotected() {
|
||||
if isOIDCTokenAuth(r) || ri.IsRouteUnprotected() || r.Method == "OPTIONS" {
|
||||
// Either this is a request that does not need any authentication or
|
||||
// the authentication for this request is handled by the IdP.
|
||||
next.ServeHTTP(w, r)
|
||||
|
||||
Reference in New Issue
Block a user