mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-11 22:30:47 +01:00
fix auth redirect
This commit is contained in:
@@ -47,12 +47,11 @@ func AuthRedirectHandler(w http.ResponseWriter, r *http.Request) {
|
||||
case oauthConfig != nil:
|
||||
RedirectOIDC(w, r)
|
||||
return
|
||||
case common.APIJWTSecret == nil:
|
||||
case common.APIJWTSecret != nil:
|
||||
http.Redirect(w, r, "/login", http.StatusTemporaryRedirect)
|
||||
return
|
||||
default:
|
||||
U.WriteBody(w, []byte("skip"))
|
||||
w.WriteHeader(http.StatusOK)
|
||||
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user