refactor: disable h2 is https2http

This commit is contained in:
avwo
2022-04-24 12:55:21 +08:00
parent 2ed1b9eace
commit 09230f4c71
+1 -1
View File
@@ -223,8 +223,8 @@ module.exports = function (req, res, next) {
isHttpsProxy = proxyRule.isHttps || proxyRule.isHttpsInternal;
isInternalProxy = proxyRule.isInternal;
if (isInternalProxy || proxyRule.isHttps2http) {
req.isH2 = false;
if (options.protocol === 'https:') {
req.isH2 = false;
headers[config.HTTPS_FIELD] = 1;
origProto = options.protocol;
options.protocol = null;