Do not use headers from abaculus in combination with sendWithHeaders
This commit is contained in:
parent
6843692f01
commit
fde680450f
@ -29,6 +29,8 @@ NamedStaticMapsController.prototype.named = function(req, res) {
|
||||
this.app.doCORS(res);
|
||||
var cdbUser = cdbRequest.userByReq(req);
|
||||
|
||||
var format = req.params.format === 'jpg' ? 'jpeg' : 'png';
|
||||
|
||||
var template;
|
||||
var layergroupConfig;
|
||||
var layergroupId;
|
||||
@ -186,7 +188,8 @@ NamedStaticMapsController.prototype.named = function(req, res) {
|
||||
}
|
||||
self.app.sendError(res, err, self.app.findStatusCode(err), 'STATIC_VIZ_MAP', err);
|
||||
} else {
|
||||
self.app.sendWithHeaders(res, image, 200, headers);
|
||||
res.setHeader('Content-Type', headers['Content-Type'] || 'image/' + format);
|
||||
self.app.sendResponse(res, [image, 200]);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user