From 005827e65a266936dacc354b426dd22f8f460b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Tue, 18 Jul 2023 06:23:29 +0200 Subject: [PATCH 1/2] Sequential versioning instead of semantic, since it wasn't used correctly anyway. --- main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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) From 53f4fc363ab3bf376e2ca7ef5852c99fc419b349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Tue, 18 Jul 2023 06:23:51 +0200 Subject: [PATCH 2/2] Trying to fix firefox importmap race condition. --- static/favicon.ico | Bin 0 -> 2686 bytes static/index.html | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 static/favicon.ico diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..4d102455ad83be9a53d080a2c3da909f571d2cae GIT binary patch literal 2686 zcmeHD!41MN47>_nym&DKV`K^Mz!;e)Q)CJLVT1DE9nPsMN>x=wLVekheYu?FBnNa{ zA)Hx{xSfCtfGaaFBU8^k+yQsM9dHNS0e8S1_?H8f5jjjT8;<-7Um}!Ii`FGH{bBQ- zhAaFoB9(dz_P5x;6QeH7&-$+UeI=!+=RJ#JY4G8b{;c|h#~B~>U*EghUxsh - - + +