From 40eeed9b8cb9cd009141b6d0e5231db7b3b1bafb Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 21 May 2025 23:51:15 +0200 Subject: HTTPd: Use `Content-Type: application/x-protobuf` for .pbf tiles. application/protobuf and application/vnd.google.protobuf might be valid types too, cf. https://stackoverflow.com/questions/30505408/what-is-the-correct-protobuf-content-type But we use application/x-protobuf since it appears more common. That's what cloudflare lists at least: https://developers.cloudflare.com/speed/optimization/content/compression/ --- files/etc/nginx/sites-available/webmap | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'files/etc/nginx') diff --git a/files/etc/nginx/sites-available/webmap b/files/etc/nginx/sites-available/webmap index 32937fa..e5da0be 100644 --- a/files/etc/nginx/sites-available/webmap +++ b/files/etc/nginx/sites-available/webmap @@ -56,6 +56,13 @@ server { add_header Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; form-action 'none'; base-uri 'self'"; #add_header Access-Control-Allow-Origin "*" always; + include mime.types; + types { + # application/protobuf and application/vnd.google.protobuf might be valid types too, cf. + # https://stackoverflow.com/questions/30505408/what-is-the-correct-protobuf-content-type + application/x-protobuf pbf; + } + location ^~ /assets/ { expires 7d; brotli_static on; -- cgit v1.2.3