move styles location block to dynamic

This commit is contained in:
Zsolt Ero
2024-10-23 23:48:30 +02:00
parent 2084f24469
commit b9e3dc394e
3 changed files with 26 additions and 13 deletions

View File

@@ -37,6 +37,19 @@ server {
__LOCATION_BLOCKS__ __LOCATION_BLOCKS__
location /styles/ {
# trailing slash
alias /data/ofm/http_host/assets/styles/ofm/; # trailing slash
try_files $uri.json =404;
expires 1d;
default_type application/json;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header Cache-Control public;
}
# catch-all block to deny all other requests # catch-all block to deny all other requests
location / { location / {
deny all; deny all;

View File

@@ -31,6 +31,19 @@ server {
__LOCATION_BLOCKS__ __LOCATION_BLOCKS__
location /styles/ {
# trailing slash
alias /data/ofm/http_host/assets/styles/ofm/; # trailing slash
try_files $uri.json =404;
expires 1d;
default_type application/json;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header Cache-Control public;
}
# catch-all block to deny all other requests # catch-all block to deny all other requests
location / { location / {
deny all; deny all;

View File

@@ -10,19 +10,6 @@ location /fonts/ {
add_header Cache-Control public; add_header Cache-Control public;
} }
location /styles/ {
# trailing slash
alias /data/ofm/http_host/assets/styles/ofm/; # trailing slash
try_files $uri.json =404;
expires 1d;
default_type application/json;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header Cache-Control public;
}
location /natural_earth/ { location /natural_earth/ {
# trailing slash # trailing slash