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:
|
case oauthConfig != nil:
|
||||||
RedirectOIDC(w, r)
|
RedirectOIDC(w, r)
|
||||||
return
|
return
|
||||||
case common.APIJWTSecret == nil:
|
case common.APIJWTSecret != nil:
|
||||||
http.Redirect(w, r, "/login", http.StatusTemporaryRedirect)
|
http.Redirect(w, r, "/login", http.StatusTemporaryRedirect)
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
U.WriteBody(w, []byte("skip"))
|
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
|
||||||
w.WriteHeader(http.StatusOK)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue