diff --git a/main.go b/main.go index 3ac840b..1d0f35f 100644 --- a/main.go +++ b/main.go @@ -20,7 +20,7 @@ import ( _ "embed" ) -const VERSION = "v0.3.0"; +const VERSION = "v6"; const LISTEN_HOST = "0.0.0.0"; const DB_SCHEMA = 10 @@ -112,7 +112,12 @@ func staticHandler(w http.ResponseWriter, r *http.Request) {// {{{ // To get rid of problems with cached content in browser on a new version release, // while also not disabling cache altogether. log.Printf("static: %s", r.URL.Path) - rxp := regexp.MustCompile("^/(css|images|js|fonts)/v[0-9]+\\.[0-9]+\\.[0-9]+/(.*)$") + if r.URL.Path == "/favicon.ico" { + static.ServeHTTP(w, r) + return + } + + rxp := regexp.MustCompile("^/(css|images|js|fonts)/v[0-9]+/(.*)$") if comp := rxp.FindStringSubmatch(r.URL.Path); comp != nil { r.URL.Path = fmt.Sprintf("/%s/%s", comp[1], comp[2]) static.ServeHTTP(w, r)