summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-05-24 08:36:56 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-05-24 08:48:58 +0200
commitaba2da0757d6d459baa431786c815c74da4e830c (patch)
tree343720fceee3542684e32bbad85d892a49067939 /files
parent9eb434bb0ec5f6802cfa84411cf3384bcc8ab709 (diff)
Serve empty error pages as text/plain not application/x-empty.
So Firefox and Chromium serve a blank page resp. a generic ”HTTP ERROR 404” page. With application/x-empty Chromium serves the following This site can’t be reached The webpage at https://example.net/… might be temporarily down or it may have moved permanently to a new web address. ERR_INVALID_RESPONSE which can be confusing (even though only OpenLayer should consume those error pages). This reverts commit 1843371641f5b3898893df91094412eaeedc8807.
Diffstat (limited to 'files')
-rw-r--r--files/etc/nginx/sites-available/webmap5
1 files changed, 2 insertions, 3 deletions
diff --git a/files/etc/nginx/sites-available/webmap b/files/etc/nginx/sites-available/webmap
index e5da0be..57368cb 100644
--- a/files/etc/nginx/sites-available/webmap
+++ b/files/etc/nginx/sites-available/webmap
@@ -73,7 +73,7 @@ server {
brotli_static on;
try_files $uri =404;
# service an empty payload to save bandwidth
- error_page 404 /_empty;
+ error_page 404 /_.txt;
}
location = /tiles/metadata.json {
expires epoch;
@@ -81,12 +81,11 @@ server {
try_files $uri =404;
}
- location = /_empty {
+ location = /_.txt {
# 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;
}