From 0a852edc35ab9d2e44d9aef0b5ff9463e3bbd6de Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev Date: Mon, 22 Jun 2026 16:21:02 +0700 Subject: [PATCH] Fix web cache and service worker handoff --- nginx.conf | 7 +++++++ web/index.prod.html | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/nginx.conf b/nginx.conf index f1a64f8..a2564fc 100644 --- a/nginx.conf +++ b/nginx.conf @@ -84,6 +84,13 @@ server { try_files $uri =404; } + location = /main.dart.js { + add_header Cache-Control "no-cache" always; + add_header Pragma "no-cache" always; + add_header Expires "0" always; + try_files /main.dart.js =404; + } + location ~* \.(js|mjs|wasm|json|png|jpg|jpeg|gif|webp|svg|ico|woff|woff2|ttf)$ { add_header Cache-Control "public, max-age=31536000, immutable" always; try_files $uri =404; diff --git a/web/index.prod.html b/web/index.prod.html index f2e6d6f..1698343 100644 --- a/web/index.prod.html +++ b/web/index.prod.html @@ -38,8 +38,13 @@