Fix image loading and improve PWA install guidance.

Allow /images/ as public static assets and show install hints on all pages including mobile and HTTP deployments.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-15 08:56:14 +08:00
parent ecd4f25700
commit ee74d31dac
2 changed files with 58 additions and 21 deletions
+1
View File
@@ -104,6 +104,7 @@ const PUBLIC_PATHS = new Set([
function isPublicPath(reqPath) {
if (PUBLIC_PATHS.has(reqPath)) return true
if (reqPath.startsWith('/assets/')) return true
if (reqPath.startsWith('/images/')) return true
if (reqPath === '/sw.js' || reqPath.endsWith('.webmanifest')) return true
if (/^\/workbox-[\w-]+\.js$/.test(reqPath)) return true
return false