mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-09 13:02:33 +02:00
fix auth redirect
This commit is contained in:
parent
7cd44b5ad3
commit
2af2346e35
1 changed files with 2 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue