updated nginx config for cache busting
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Philipp Dormann 2023-02-03 17:18:57 +01:00
parent eccce0795b
commit 8e2b355466
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314
1 changed files with 29 additions and 23 deletions

View File

@ -7,15 +7,21 @@ http {
error_page 404 /index.html;
root /usr/share/nginx/html;
location / {
rewrite /register/(.*) /$1 break;
rewrite /profile/(.*) /$1 break;
rewrite /register/(.*) /$1 break;
rewrite /profile/(.*) /$1 break;
try_files $uri $uri/ /index.html;
add_header Last-Modified $date_gmt;
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
if_modified_since off;
expires off;
etag off;
}
location ~* \.(?:ico|css|gif|jpe?g|png)$ {
rewrite /register/(.*) /$1 break;
rewrite /profile/(.*) /$1 break;
rewrite /register/(.*) /$1 break;
rewrite /profile/(.*) /$1 break;
expires 1y;
add_header Pragma public;
@ -35,24 +41,24 @@ http {
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types application/javascript
application/rss+xml
application/vnd.ms-fontobject
application/x-font
application/x-font-opentype
application/x-font-otf
application/x-font-truetype
application/x-font-ttf
application/x-javascript
application/xhtml+xml
application/xml
font/opentype
font/otf
font/ttf
image/svg+xml
image/x-icon
text/css
text/javascript
text/plain
text/xml;
application/rss+xml
application/vnd.ms-fontobject
application/x-font
application/x-font-opentype
application/x-font-otf
application/x-font-truetype
application/x-font-ttf
application/x-javascript
application/xhtml+xml
application/xml
font/opentype
font/otf
font/ttf
image/svg+xml
image/x-icon
text/css
text/javascript
text/plain
text/xml;
}
}