Add one more fix to nginx.conf for i18n

This commit is contained in:
wiz 2020-12-02 21:21:44 +09:00
parent 2ef87603fd
commit 352afbc029
No known key found for this signature in database
GPG key ID: A394E332255A6173

View file

@ -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