Generating the domain inside the style JSON files dynamically (using nginx sub_filter).

This commit is contained in:
Zsolt Ero
2024-10-24 01:29:12 +02:00
parent 2bee8df5fe
commit 717a197ba8
3 changed files with 18 additions and 0 deletions

View File

@@ -185,6 +185,14 @@ See [dev setup docs](docs/dev_setup.md).
## Changelog ## Changelog
**v0.8**
Lot of self-hosting related fixes.
Generating the domain inside the style JSON files dynamically (using nginx sub_filter).
Added SKIP_LETSENCRYPT variable for cases when the certificates are self-managed or self-signed is OK.
**v0.7** **v0.7**
MBTiles are now uploaded, next to the btrfs image files. MBTiles are now uploaded, next to the btrfs image files.

View File

@@ -46,6 +46,11 @@ server {
expires 1d; expires 1d;
default_type application/json; default_type application/json;
# substitute the domain in the TileJSON
sub_filter '__TILEJSON_DOMAIN__' '__DOMAIN__';
sub_filter_once off;
sub_filter_types '*';
add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Allow-Origin' '*' always;
add_header Cache-Control public; add_header Cache-Control public;
} }

View File

@@ -40,6 +40,11 @@ server {
expires 1d; expires 1d;
default_type application/json; default_type application/json;
# substitute the domain in the TileJSON
sub_filter '__TILEJSON_DOMAIN__' '__DOMAIN__';
sub_filter_once off;
sub_filter_types '*';
add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Allow-Origin' '*' always;
add_header Cache-Control public; add_header Cache-Control public;
} }