Send Access-Control-Allow-Origin with tile redirects
authorTom Hughes <tom@compton.nu>
Mon, 4 Jun 2018 09:13:34 +0000 (10:13 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 4 Jun 2018 09:13:34 +0000 (10:13 +0100)
cookbooks/tilecache/templates/default/nginx_tile.conf.erb

index f5ae626..f250bb9 100644 (file)
@@ -94,6 +94,7 @@ server {
     listen 80 default_server;
     listen [::]:80 default_server;
     server_name _;
+    add_header Access-Control-Allow-Origin *;
     return 301 https://$host$request_uri;
 }
 
@@ -101,5 +102,6 @@ server {
     listen 80;
     listen [::]:80;
     server_name ~^(?<subdomain>(?:[a-d]\.)?tile)\.osm\.org$;
+    add_header Access-Control-Allow-Origin *;
     return 301 https://$subdomain.openstreetmap.org$request_uri;
 }