Skip to content

Commit

Permalink
A working but very insecure and unconfigurable forward to https
Browse files Browse the repository at this point in the history
  • Loading branch information
natefoo committed Sep 15, 2022
1 parent ed49ea7 commit cf9aa6a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ DynamicProxy.prototype.configureForward = function(req, target) {
} else {
delete req.headers["x-interactive-tool-port"];
}
_target.protocol = "https:";
return _target;
};

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cf9aa6a

Please sign in to comment.