tweaks
This commit is contained in:
parent
40b4752ed2
commit
1c383282dd
29 changed files with 241 additions and 108 deletions
9
deploy/Caddyfile-cache
Normal file
9
deploy/Caddyfile-cache
Normal 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"
|
||||
17
deploy/apache-cache.htaccess
Normal file
17
deploy/apache-cache.htaccess
Normal 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
20
deploy/nginx-cache.conf
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue