From 60e4defa662dfc7eabd75d5980e56f9389ea80c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Mart=C3=ADn?= Date: Mon, 27 Nov 2017 17:04:50 +0100 Subject: [PATCH] default value in errors header --- lib/cartodb/server.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/cartodb/server.js b/lib/cartodb/server.js index 08ec1a66..3849417a 100644 --- a/lib/cartodb/server.js +++ b/lib/cartodb/server.js @@ -409,6 +409,12 @@ function setupLogger(app, opts) { }; app.use(global.log4js.connectLogger(global.log4js.getLogger(), _.defaults(loggerOpts, {level: 'info'}))); } + + // default X-Tiler-Errors header + app.use((req, res, next) => { + res.set('X-Tiler-Errors', '{}'); + next(); + }); } function surrogateKeysCacheBackends(serverOptions) {