fix: set Cache-Control header for index.html response

This commit is contained in:
2025-11-28 23:06:47 +08:00
parent 57b0a10c4d
commit 23269ad9d1

View File

@@ -32,6 +32,7 @@ func FrontendMiddleware(c fiber.Ctx) error {
}
if _, err := os.Stat(file); path == "/" || os.IsNotExist(err) {
c.Set("Cache-Control", "no-cache")
return serveIndexHtml(c)
} else {
c.Set("Cache-Control", "public, max-age=31536000, immutable")