diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2025-05-21 23:51:15 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2025-05-22 00:02:04 +0200 |
commit | 40eeed9b8cb9cd009141b6d0e5231db7b3b1bafb (patch) | |
tree | a841019af3dc2b794d0e8980e46f6fef920d9518 /files/etc/nginx | |
parent | 1843371641f5b3898893df91094412eaeedc8807 (diff) |
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/
Diffstat (limited to 'files/etc/nginx')
-rw-r--r-- | files/etc/nginx/sites-available/webmap | 7 |
1 files changed, 7 insertions, 0 deletions
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; |