*(home): fix assets access
This commit is contained in:
parent
df1f7ebc8d
commit
502fe3cfc5
|
@ -381,10 +381,9 @@ func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.Re
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if strings.HasPrefix(r.URL.Path, "/assets/") ||
|
} else if strings.HasPrefix(r.URL.Path, "/assets/") ||
|
||||||
strings.HasPrefix(r.URL.Path, "/login.") ||
|
strings.HasPrefix(r.URL.Path, "/login.") {
|
||||||
strings.HasPrefix(r.URL.Path, "/__locales/") {
|
|
||||||
// process as usual
|
// process as usual
|
||||||
|
// no additional auth requirements
|
||||||
} else if Context.auth != nil && Context.auth.AuthRequired() {
|
} else if Context.auth != nil && Context.auth.AuthRequired() {
|
||||||
// redirect to login page if not authenticated
|
// redirect to login page if not authenticated
|
||||||
ok := false
|
ok := false
|
||||||
|
|
|
@ -188,7 +188,7 @@ func postInstall(handler func(http.ResponseWriter, *http.Request)) func(http.Res
|
||||||
|
|
||||||
if Context.firstRun &&
|
if Context.firstRun &&
|
||||||
!strings.HasPrefix(r.URL.Path, "/install.") &&
|
!strings.HasPrefix(r.URL.Path, "/install.") &&
|
||||||
r.URL.Path != "/favicon.png" {
|
!strings.HasPrefix(r.URL.Path, "/assets/") {
|
||||||
http.Redirect(w, r, "/install.html", http.StatusFound)
|
http.Redirect(w, r, "/install.html", http.StatusFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue