1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #3829 from Steve-Mcl/backport-3776

Allow HTTP Headers not in spec (backport to v2.x)
This commit is contained in:
Nick O'Leary 2022-08-04 13:49:43 +01:00 committed by GitHub
commit 2ea4b15dca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

View File

@ -91,6 +91,11 @@
<label for="node-input-senderr" style="width: auto" data-i18n="httpin.senderr"></label>
</div>
<div class="form-row">
<input type="checkbox" id="node-input-insecureHTTPParser" style="display: inline-block; width: auto; vertical-align: top;">
<label for="node-input-insecureHTTPParser", style="width: auto;" data-i18n="httpin.insecureHTTPParser"></label>
</div>
<div class="form-row">
<label for="node-input-ret"><i class="fa fa-arrow-left"></i> <span data-i18n="httpin.label.return"></span></label>
@ -120,6 +125,7 @@
tls: {type:"tls-config",required: false},
persist: {value:false},
proxy: {type:"http proxy",required: false},
insecureHTTPParser: {value: false},
authType: {value: ""},
senderr: {value: false}
},
@ -224,6 +230,12 @@
} else {
$("#node-input-useProxy").prop("checked", false);
}
if (node.insecureHTTPParser) {
$("node-intput-insecureHTTPParser").prop("checked", true)
} else {
$("node-intput-insecureHTTPParser").prop("checked", false)
}
updateProxyOptions();
$("#node-input-useProxy").on("click", function() {
updateProxyOptions();

View File

@ -214,6 +214,10 @@ in your Node-RED user directory (${RED.settings.userDir}).
delete options.headers[h];
}
})
if (node.insecureHTTPParser) {
options.insecureHTTPParser = true
}
}
],
beforeRedirect: [

View File

@ -525,7 +525,8 @@
},
"status": {
"requesting": "requesting"
}
},
"insecureHTTPParser": "Disable strict HTTP parsing"
},
"websocket": {
"label": {