mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
move styles location block to dynamic
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user