Commit graph

12 commits

Author SHA1 Message Date
Steven
91a7e927a5 fix(server): reduce static asset cache to prevent stale files after redeploy
Changed Cache-Control max-age from 7 days to 1 hour with immutable directive.
This prevents users from experiencing blank pages or JS errors when accessing
frequently redeployed instances (e.g., demo environments) where old cached
assets may reference files that no longer exist after redeployment.

Since Vite generates content-hashed filenames, the immutable directive prevents
unnecessary revalidation while the shorter cache duration ensures fresh assets
are served within an hour of redeployment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 07:55:02 +08:00
Steven
f1b365f928 refactor: clean packages 2025-05-29 21:44:43 +08:00
倒霉狐狸
ebf13c4dff
chore: caching resource files accelerates second requests (#4614)
* cache assets files

* Apply suggestions from code review

* Update server/router/frontend/frontend.go

* Update server/router/frontend/frontend.go

---------

Co-authored-by: Johnny <yourselfhosted@gmail.com>
2025-04-09 22:22:03 +08:00
Johnny
d794e6db76
chore: remove internal frontend cache 2025-03-13 11:23:27 +08:00
Johnny
b56aa397b2 chore: update assets routes 2025-02-26 21:40:28 +08:00
boojack
04d7ba48e5
chore: remove default gzip middleware 2025-02-13 22:00:55 +08:00
Steven
57c00734e2 fix: frontend build 2024-11-05 21:15:13 +08:00
Steven
98f2cf6397 chore: tweak linter 2024-05-30 07:23:16 +08:00
Steven
b215426623 chore: update general setting 2024-05-30 07:19:38 +08:00
Steven
144269fbbc chore: fix router 2024-05-01 12:44:18 +08:00
Steven
832ad92bac chore: update gitignore 2024-05-01 10:31:26 +08:00
Steven
20dd3e17f7 chore: rename router package 2024-05-01 10:28:32 +08:00