From fa871c7ada28295546cdda59f9c0674abfee9f17 Mon Sep 17 00:00:00 2001 From: "girish@cloudron.io" Date: Wed, 3 Feb 2016 20:18:59 -0800 Subject: [PATCH] some apache configs require Host header to be set --- src/apphealthmonitor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apphealthmonitor.js b/src/apphealthmonitor.js index a5870f277..c7e235bb3 100644 --- a/src/apphealthmonitor.js +++ b/src/apphealthmonitor.js @@ -3,6 +3,7 @@ var appdb = require('./appdb.js'), assert = require('assert'), async = require('async'), + config = require('./config.js'), DatabaseError = require('./databaseerror.js'), debug = require('debug')('box:apphealthmonitor'), docker = require('./docker.js').connection, @@ -89,6 +90,7 @@ function checkAppHealth(app, callback) { var healthCheckUrl = 'http://127.0.0.1:' + app.httpPort + manifest.healthCheckPath; superagent .get(healthCheckUrl) + .set('Host', config.appFqdn(app.location)) // required for some apache configs with rewrite rules .redirects(0) .timeout(HEALTHCHECK_INTERVAL) .end(function (error, res) {