1
0
mirror of https://github.com/amir20/dozzle.git synced 2026-01-02 11:07:26 +01:00

Fixes security error with invalid session

This commit is contained in:
Amir Raminfar
2021-04-11 13:53:16 -07:00
parent c89e70d697
commit 2bbbb5f7a5
2 changed files with 4 additions and 5 deletions

View File

@@ -82,7 +82,7 @@ func (h *handler) index(w http.ResponseWriter, req *http.Request) {
if err == nil && req.URL.Path != "" && req.URL.Path != "/" {
fileServer.ServeHTTP(w, req)
} else {
if !h.isAuthorized(req) && req.URL.Path != "login" {
if !isAuthorized(req) && req.URL.Path != "login" {
http.Redirect(w, req, h.config.Base+"login", http.StatusTemporaryRedirect)
return
}