Merge: - control: allow requests to "/favicon.ico" while we are in install mode
Close #766 * commit 'dece393d6acfa21f588505e494eb1225adc8376a': - control: allow requests to "/favicon.ico" while we are in install mode
This commit is contained in:
commit
fdd0f594fb
|
@ -140,7 +140,9 @@ func preInstallHandler(handler http.Handler) http.Handler {
|
||||||
// it also enforces HTTPS if it is enabled and configured
|
// it also enforces HTTPS if it is enabled and configured
|
||||||
func postInstall(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
|
func postInstall(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
if config.firstRun && !strings.HasPrefix(r.URL.Path, "/install.") {
|
if config.firstRun &&
|
||||||
|
!strings.HasPrefix(r.URL.Path, "/install.") &&
|
||||||
|
r.URL.Path != "/favicon.ico" {
|
||||||
http.Redirect(w, r, "/install.html", http.StatusSeeOther) // should not be cacheable
|
http.Redirect(w, r, "/install.html", http.StatusSeeOther) // should not be cacheable
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue