Set 404 as defautl status code and set the proper status code fir the response at very same time that the response body

This commit is contained in:
Daniel García Aubert
2018-05-09 15:00:18 +02:00
parent 9feea66550
commit c51e254287
13 changed files with 25 additions and 1 deletions
@@ -109,6 +109,7 @@ function getPreviewImageByCenter (previewBackend) {
res.set('Content-Type', headers['Content-Type'] || `image/${format}`);
res.statusCode = 200;
res.body = image;
next();
@@ -144,6 +145,7 @@ function getPreviewImageByBoundingBox (previewBackend) {
res.set('Content-Type', headers['Content-Type'] || `image/${format}`);
res.statusCode = 200;
res.body = image;
next();