diff --git a/docker/nginx.conf b/docker/nginx.conf index 9103f87..c59dcfd 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -14,6 +14,13 @@ http { access_log /var/log/nginx/access.log main; sendfile on; keepalive_timeout 65; + + # Expires map + map $sent_http_content_type $expires { + default 30d; + text/html 2h; + } + server { listen 80; server_name localhost; @@ -21,13 +28,11 @@ http { # Hide nginx version server_tokens off; - # TODO: maybe setup cache as well - location / { root /app; index index.html; try_files $uri $uri/ /index.html; - expires 1d; + expires $expires; add_header Pragma public; add_header Cache-Control "public"; }