diff options
-rw-r--r-- | files/etc/nginx/sites-available/webmap | 6 | ||||
-rw-r--r-- | tasks/httpd.yml | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/files/etc/nginx/sites-available/webmap b/files/etc/nginx/sites-available/webmap index 6921c2c..32937fa 100644 --- a/files/etc/nginx/sites-available/webmap +++ b/files/etc/nginx/sites-available/webmap @@ -65,7 +65,8 @@ server { expires 8h; brotli_static on; try_files $uri =404; - error_page 404 /_.txt; + # service an empty payload to save bandwidth + error_page 404 /_empty; } location = /tiles/metadata.json { expires epoch; @@ -73,11 +74,12 @@ server { try_files $uri =404; } - location = /_.txt { + location = /_empty { # cache 404 responses for 8h like for valid tiles add_header Strict-Transport-Security "max-age=31557600; includeSubDomains" always; add_header Cache-Control "public; max-age=28800" always; #add_header Access-Control-Allow-Origin "*" always; + default_type application/x-empty; internal; } diff --git a/tasks/httpd.yml b/tasks/httpd.yml index 2e1fa98..ea2dee0 100644 --- a/tasks/httpd.yml +++ b/tasks/httpd.yml @@ -55,8 +55,8 @@ owner=root group=root mode=0755 -- name: Create /var/www/webmap/_.txt - copy: dest=/var/www/webmap/_.txt content="" +- name: Create /var/www/webmap/_empty + copy: dest=/var/www/webmap/_empty content="" owner=root group=root mode=0644 |