From dece393d6acfa21f588505e494eb1225adc8376a Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Thu, 23 May 2019 16:28:20 +0300 Subject: [PATCH] - control: allow requests to "/favicon.ico" while we are in install mode --- helpers.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helpers.go b/helpers.go index f94b2007..6f35caba 100644 --- a/helpers.go +++ b/helpers.go @@ -140,7 +140,9 @@ func preInstallHandler(handler http.Handler) http.Handler { // it also enforces HTTPS if it is enabled and configured func postInstall(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *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 return }