perf(caddy): 해시 빌드 자산에 장기 캐시를 적용
Vite content hash가 포함된 frontend asset만 1년 immutable로 제공한다. HTML, hash 없는 asset과 별도 image 경로는 기존 재검증 정책을 유지하고 matcher 회귀 테스트와 운영 문서를 추가한다.
This commit is contained in:
@@ -10,6 +10,11 @@
|
||||
{$SITE_ADDRESS} {
|
||||
encode zstd gzip
|
||||
|
||||
# Vite emits content-hashed files below each frontend's assets directory.
|
||||
# Defer this header so it replaces vite preview's default no-cache value.
|
||||
@immutableFrontendAssets path_regexp immutableFrontendAssets ^/(gateway|che|kwe|pwe|twe|nya|pya|hwe)/assets/.+-[A-Za-z0-9_-]{8}\.[^/]+$
|
||||
header @immutableFrontendAssets >Cache-Control "public, max-age=31536000, immutable"
|
||||
|
||||
redir /gateway /gateway/ 308
|
||||
redir /che /che/ 308
|
||||
redir /kwe /kwe/ 308
|
||||
|
||||
Reference in New Issue
Block a user