Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-04-02 23:11:06 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-04-02 23:11:06 +0300
commitc147636133a62b5a5b90f9cc4abc37949832e2e1 (patch)
tree6471ed45e3971185a6ddc832a1264f364bfcf7eb /web/assets/js/model/outbound.js
parentfa7a6a3f99ba2d0b08f9893fc6f04c434a3ec8f8 (diff)
add header for httpupgrade
Diffstat (limited to 'web/assets/js/model/outbound.js')
-rw-r--r--web/assets/js/model/outbound.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js
index aa83287c..6c4313b1 100644
--- a/web/assets/js/model/outbound.js
+++ b/web/assets/js/model/outbound.js
@@ -290,6 +290,7 @@ class HttpUpgradeStreamSettings extends CommonClass {
return new HttpUpgradeStreamSettings(
json.path,
json.Host,
+ json.headers && !ObjectUtil.isEmpty(json.headers.Host) ? json.headers.Host : '',
);
}
@@ -297,6 +298,7 @@ class HttpUpgradeStreamSettings extends CommonClass {
return {
path: this.path,
host: this.host,
+ headers: ObjectUtil.isEmpty(this.host) ? undefined : {Host: this.host},
};
}
}