From 26eb3502bedc4520d751601489957a133b080640 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Mon, 17 Aug 2015 20:20:58 -0700 Subject: [PATCH] Respect x-forwarded-proto for ACP --- lib/web/acp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/acp.js b/lib/web/acp.js index 17122f3b..707c6a8b 100644 --- a/lib/web/acp.js +++ b/lib/web/acp.js @@ -28,7 +28,7 @@ function checkAdmin(cb) { */ function handleAcp(req, res, user) { var sio; - if (req.secure) { + if (req.secure || req.header("x-forwarded-proto") === "https") { sio = Config.get("https.domain") + ":" + Config.get("https.default-port"); } else { sio = Config.get("io.domain") + ":" + Config.get("io.default-port");