From cf9aa6aef289adc5726a03fbc2881d178cc1300c Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Thu, 15 Sep 2022 15:57:34 -0400 Subject: [PATCH] A working but very insecure and unconfigurable forward to https --- lib/proxy.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/proxy.js b/lib/proxy.js index 45dfd90..fb06aac 100644 --- a/lib/proxy.js +++ b/lib/proxy.js @@ -149,6 +149,7 @@ DynamicProxy.prototype.configureForward = function(req, target) { } else { delete req.headers["x-interactive-tool-port"]; } + _target.protocol = "https:"; return _target; }; @@ -210,7 +211,9 @@ DynamicProxy.prototype.handleProxyRequest = function(req, res) { req, res, { - target: target + target: target, + secure: false, + changeOrigin: true }, function(e) { console.log("Proxy error: ", e); @@ -253,7 +256,9 @@ DynamicProxy.prototype.handleWs = function(req, res, head) { res, head, { - target: target + target: target, + secure: false, + changeOrigin: true }, function(e) { console.log("Proxy error: ", e);