Update ReverseProxy.js
Enabling `xfwd` caused some issues, going to disable it for the time being
This commit is contained in:
@@ -153,7 +153,7 @@ class ReverseProxy {
|
|||||||
request = this.#PostProcessRequest(request, _bail);
|
request = this.#PostProcessRequest(request, _bail);
|
||||||
if (IsNullOrUndefined(request)) return;
|
if (IsNullOrUndefined(request)) return;
|
||||||
|
|
||||||
this.ProxyService.web(request, response, { target: request.resolvedHost, xfwd: true }, proxyException => {
|
this.ProxyService.web(request, response, { target: request.resolvedHost, xfwd: false }, proxyException => {
|
||||||
return _bail(502); // Bad Gateway: Error related to proxying
|
return _bail(502); // Bad Gateway: Error related to proxying
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -167,7 +167,7 @@ class ReverseProxy {
|
|||||||
request = this.#PostProcessRequest(request, _bail);
|
request = this.#PostProcessRequest(request, _bail);
|
||||||
if (IsNullOrUndefined(request)) return;
|
if (IsNullOrUndefined(request)) return;
|
||||||
|
|
||||||
this.ProxyService.ws(request, socket, head, { target: request.resolvedHost, xfwd: true }, proxyException => {
|
this.ProxyService.ws(request, socket, head, { target: request.resolvedHost, xfwd: false }, proxyException => {
|
||||||
return _bail(502); // Bad Gateway: Error related to proxying
|
return _bail(502); // Bad Gateway: Error related to proxying
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -194,7 +194,7 @@ class ReverseProxy {
|
|||||||
// port is irrelevent in this case, so don't include it
|
// port is irrelevent in this case, so don't include it
|
||||||
request.originalHost = host;
|
request.originalHost = host;
|
||||||
request.resolvedHost = resolvedHost;
|
request.resolvedHost = resolvedHost;
|
||||||
request.headers.host = resolvedHostname;
|
request.headers.host = host;//resolvedHostname;
|
||||||
// Attach the bailHandler to the request, so proxyRes can call it in case it needs to
|
// Attach the bailHandler to the request, so proxyRes can call it in case it needs to
|
||||||
request.bailHandler = bailHandler;
|
request.bailHandler = bailHandler;
|
||||||
// Request is ready to proxy, send it out
|
// Request is ready to proxy, send it out
|
||||||
|
|||||||
Reference in New Issue
Block a user