From 3a26692448d8d7eb186c839fd71774a7b8d26151 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Fri, 22 Aug 2014 12:29:27 +0200 Subject: [PATCH] New header for database host serving the request --- NEWS.md | 5 ++++- app/controllers/app.js | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 970750be..4bddb14c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,10 @@ 1.16.1 - 2014-mm-dd ------------------- +New features: + + * New header for database host serving the request + Enhancements: * Upgrades dependencies: @@ -9,7 +13,6 @@ Enhancements: * log4js - 1.16.0 - 2014-08-19 ------------------- diff --git a/app/controllers/app.js b/app/controllers/app.js index cf4dbb14..dac5de1b 100755 --- a/app/controllers/app.js +++ b/app/controllers/app.js @@ -479,6 +479,9 @@ function handleQuery(req, res) { if (global.settings.api_hostname) { res.header('X-Served-By-Host', global.settings.api_hostname); } + if (dbopts.host) { + res.header('X-Served-By-DB-Host', dbopts.host); + } formatter.sendResponse(opts, this); }, function errorHandle(err){