This commit is contained in:
33333-33333 2026-06-08 23:53:34 +09:00
commit 1c383282dd
29 changed files with 241 additions and 108 deletions

9
deploy/Caddyfile-cache Normal file
View file

@ -0,0 +1,9 @@
# Adapt these directives inside the Caddy site block that serves this static app.
encode gzip zstd
@html path /index.html
header @html Cache-Control "no-cache"
@assets path *.js *.css
header @assets Cache-Control "no-cache"

View file

@ -0,0 +1,17 @@
# Use this from the static site root when served by Apache with .htaccess enabled.
FileETag MTime Size
<IfModule mod_headers.c>
<Files "index.html">
Header set Cache-Control "no-cache"
</Files>
<FilesMatch "\.(js|css)$">
Header set Cache-Control "no-cache"
</FilesMatch>
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css application/javascript text/javascript
</IfModule>

20
deploy/nginx-cache.conf Normal file
View file

@ -0,0 +1,20 @@
# Include this in the nginx server block that serves this static app.
#
# Example:
# server {
# root /var/www/zunda-shiwake;
# include /var/www/zunda-shiwake/deploy/nginx-cache.conf;
# }
etag on;
gzip on;
gzip_types text/css application/javascript text/javascript;
location = /index.html {
add_header Cache-Control "no-cache";
}
location ~* \.(js|css)$ {
add_header Cache-Control "no-cache";
gzip_static on;
}