fix preflight requests
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
committed by
Michael Barz
parent
4080b85033
commit
0edb2b9c5b
@@ -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