summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app.js b/app.js
index c65b8483..8f775b21 100644
--- a/app.js
+++ b/app.js
@@ -51,6 +51,13 @@ if (config.useSSL) {
server = require('http').createServer(app)
}
+// if we manage to provide HTTPS domains, but don't provide TLS ourselves
+// obviously a proxy is involded. In order to make sure express is aware of
+// this, we provide the option to trust proxies here.
+if (!config.useSSL && config.protocolUseSSL) {
+ app.set('trust proxy', 1)
+}
+
// logger
app.use(morgan('combined', {
'stream': logger.stream