New header for database host serving the request

This commit is contained in:
Raul Ochoa 2014-08-22 12:29:27 +02:00
parent ae2c6f01d7
commit 3a26692448
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,10 @@
1.16.1 - 2014-mm-dd 1.16.1 - 2014-mm-dd
------------------- -------------------
New features:
* New header for database host serving the request
Enhancements: Enhancements:
* Upgrades dependencies: * Upgrades dependencies:
@ -9,7 +13,6 @@ Enhancements:
* log4js * log4js
1.16.0 - 2014-08-19 1.16.0 - 2014-08-19
------------------- -------------------

View File

@ -479,6 +479,9 @@ function handleQuery(req, res) {
if (global.settings.api_hostname) { if (global.settings.api_hostname) {
res.header('X-Served-By-Host', 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); formatter.sendResponse(opts, this);
}, },
function errorHandle(err){ function errorHandle(err){