diff --git a/README.md b/README.md index 295a634..da00edb 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,14 @@ See [dev setup docs](docs/dev_setup.md). ## 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** MBTiles are now uploaded, next to the btrfs image files. diff --git a/modules/http_host/http_host_lib/nginx_confs/le.conf b/modules/http_host/http_host_lib/nginx_confs/le.conf index 4ad7a9f..5be3700 100644 --- a/modules/http_host/http_host_lib/nginx_confs/le.conf +++ b/modules/http_host/http_host_lib/nginx_confs/le.conf @@ -46,6 +46,11 @@ server { expires 1d; 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 Cache-Control public; } diff --git a/modules/http_host/http_host_lib/nginx_confs/ledns.conf b/modules/http_host/http_host_lib/nginx_confs/ledns.conf index c7ff0d7..40d16e1 100644 --- a/modules/http_host/http_host_lib/nginx_confs/ledns.conf +++ b/modules/http_host/http_host_lib/nginx_confs/ledns.conf @@ -40,6 +40,11 @@ server { expires 1d; 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 Cache-Control public; }