diff --git a/production/nginx-mempool.conf b/production/nginx-mempool.conf index 20a2469e0..d28f7f456 100644 --- a/production/nginx-mempool.conf +++ b/production/nginx-mempool.conf @@ -31,10 +31,15 @@ add_header X-Frame-Options $frameOptions; add_header Content-Security-Policy $contentSecurityPolicy; - # fallback + # fallback for all URLs i.e. /address/foo /tx/foo /block/000 location / { #return 302 https://mempool.space/$request_uri; - try_files /$lang/$uri /$lang/$uri/ $uri $uri/ /en-US/$uri /$lang/index.html /en-US/index.html =404; + try_files /$lang/$uri /$lang/$uri/ $uri $uri/ /en-US/$uri @index; +# /$lang/index.html /en-US/index.html =404; + } + location @index { + add_header Cache-Control must-revalidate; + try_files /$lang/index.html /en-US/index.html =404; } # location block using regex are matched in order