Return 404 for negative zoom levels on static endpoint

This commit is contained in:
Petr Sloup 2016-08-25 11:08:19 +02:00
parent 7c28bf2b21
commit a8fd1b38b7

View file

@ -462,6 +462,10 @@ module.exports = function(options, repo, params, id, dataResolver) {
scale = getScale(req.params.scale),
format = req.params.format;
if (z < 0) {
return res.status(404).send('Invalid zoom');
}
var path = extractPathFromQuery(req.query);
var overlay = renderOverlay(z, x, y, bearing, pitch, w, h, scale,
path, req.query);