diff --git a/docker/frontend/default.conf.template b/docker/frontend/default.conf.template index 76864def4..9e8bf9c0d 100644 --- a/docker/frontend/default.conf.template +++ b/docker/frontend/default.conf.template @@ -27,7 +27,15 @@ http { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html =404; + expires 1d; + add_header Cache-Control "public"; } + location = /index.html { + root /usr/share/nginx/html; + add_header Cache-Control "no-cache, no-store, must-revalidate"; + etag on; + } + location /api { proxy_pass ${BACKEND_URL}; } diff --git a/docker/frontend/nginx.conf b/docker/frontend/nginx.conf index b064a5a79..05f90d0c3 100644 --- a/docker/frontend/nginx.conf +++ b/docker/frontend/nginx.conf @@ -13,6 +13,8 @@ server { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html =404; + expires 1d; + add_header Cache-Control "public"; } location /api { proxy_pass __BACKEND_URL__;