fix(caddy): disable browser caching for schema files
Add Cache-Control: no-cache, must-revalidate for /schemas/* paths This ensures frontend always fetches fresh YAML content after updates
This commit is contained in:
parent
070c87af7b
commit
81e614098f
1 changed files with 13 additions and 0 deletions
|
|
@ -34,6 +34,19 @@
|
||||||
(static_files) {
|
(static_files) {
|
||||||
root * /var/www/glam-frontend
|
root * /var/www/glam-frontend
|
||||||
|
|
||||||
|
# Schema files (YAML/JSON) should never be cached by browsers
|
||||||
|
# This ensures frontend always fetches fresh schema content after updates
|
||||||
|
@schemas {
|
||||||
|
path /schemas/*
|
||||||
|
}
|
||||||
|
handle @schemas {
|
||||||
|
header Cache-Control "no-cache, must-revalidate"
|
||||||
|
header Pragma "no-cache"
|
||||||
|
file_server {
|
||||||
|
precompressed gzip br
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# CRITICAL FIX: Handle /assets/* separately - return 404 if not found
|
# CRITICAL FIX: Handle /assets/* separately - return 404 if not found
|
||||||
# This prevents SPA fallback from serving index.html for missing JS chunks
|
# This prevents SPA fallback from serving index.html for missing JS chunks
|
||||||
# which would cause "error loading dynamically imported module" errors
|
# which would cause "error loading dynamically imported module" errors
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue