updated nginx config for cache busting
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
eccce0795b
commit
8e2b355466
52
nginx.conf
52
nginx.conf
@ -7,15 +7,21 @@ http {
|
|||||||
error_page 404 /index.html;
|
error_page 404 /index.html;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
location / {
|
location / {
|
||||||
rewrite /register/(.*) /$1 break;
|
rewrite /register/(.*) /$1 break;
|
||||||
rewrite /profile/(.*) /$1 break;
|
rewrite /profile/(.*) /$1 break;
|
||||||
|
|
||||||
try_files $uri $uri/ /index.html;
|
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)$ {
|
location ~* \.(?:ico|css|gif|jpe?g|png)$ {
|
||||||
rewrite /register/(.*) /$1 break;
|
rewrite /register/(.*) /$1 break;
|
||||||
rewrite /profile/(.*) /$1 break;
|
rewrite /profile/(.*) /$1 break;
|
||||||
|
|
||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Pragma public;
|
add_header Pragma public;
|
||||||
@ -35,24 +41,24 @@ http {
|
|||||||
gzip_buffers 16 8k;
|
gzip_buffers 16 8k;
|
||||||
gzip_http_version 1.1;
|
gzip_http_version 1.1;
|
||||||
gzip_types application/javascript
|
gzip_types application/javascript
|
||||||
application/rss+xml
|
application/rss+xml
|
||||||
application/vnd.ms-fontobject
|
application/vnd.ms-fontobject
|
||||||
application/x-font
|
application/x-font
|
||||||
application/x-font-opentype
|
application/x-font-opentype
|
||||||
application/x-font-otf
|
application/x-font-otf
|
||||||
application/x-font-truetype
|
application/x-font-truetype
|
||||||
application/x-font-ttf
|
application/x-font-ttf
|
||||||
application/x-javascript
|
application/x-javascript
|
||||||
application/xhtml+xml
|
application/xhtml+xml
|
||||||
application/xml
|
application/xml
|
||||||
font/opentype
|
font/opentype
|
||||||
font/otf
|
font/otf
|
||||||
font/ttf
|
font/ttf
|
||||||
image/svg+xml
|
image/svg+xml
|
||||||
image/x-icon
|
image/x-icon
|
||||||
text/css
|
text/css
|
||||||
text/javascript
|
text/javascript
|
||||||
text/plain
|
text/plain
|
||||||
text/xml;
|
text/xml;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user