Change the MIME type of binary responses

This commit is contained in:
D. Berge
2025-08-01 16:50:32 +02:00
parent e464f5f887
commit 4be99370e6

View File

@@ -7,7 +7,8 @@ module.exports = async function (req, res, next) {
const handlers = {
"application/json": json,
"application/geo+json": geojson,
"application/dougal-map-sequence+octet-stream": binary
// application/vnd.aaltronav.dougal+octet-stream; format=0x1c
"application/vnd.aaltronav.dougal+octet-stream": binary
};
const mimetype = (handlers[req.query.mime] && req.query.mime) || req.accepts(Object.keys(handlers));