Commit a0ee6395 authored by Ryan Herbert's avatar Ryan Herbert

nginx_web2py, nginx_install.sh change cache control

Cached items are causing issues after updates, since the server
sometimes expects new elements in requests which the client-side files
are not yet able to provide (due to caching conserving older versions of
ressources).

Altering the caching policy to must-revalidate forces the client's
browser to check with our server whether a file has changed, allowing
nginx to respond with code "304 Not Modified" when appropriate, and
serving the new versions of outdated ressources correctly.

See #2498
parent c248d0d2
......@@ -38,6 +38,7 @@ server {
location /browser {
root /var/www;
expires 1h;
add_header Cache-Control must-revalidate;
error_page 405 = $uri;
......@@ -46,6 +47,7 @@ server {
location /germline {
root /usr/share/vidjil/;
expires 1h;
add_header Cache-Control must-revalidate;
error_page 405 = $uri;
......
......@@ -107,6 +107,7 @@ server {
location /browser {
root $CWD/../;
expires 1h;
add_header Cache-Control must-revalidate;
error_page 405 = $uri;
}
......@@ -114,6 +115,7 @@ server {
location /germline {
root $CWD/../;
expires 1h;
add_header Cache-Control must-revalidate;
error_page 405 = $uri;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment