Allow empty string header value

closes #4789
4789-cannot-set-an-header-to-empty-string
Stephen McLaughlin 2024-06-24 10:18:01 +01:00 committed by GitHub
parent cb0c484579
commit 2ccd4b5224
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
const matchingKeys = keys.filter(e => e.toLowerCase() == hn)
const updateKey = (k,v) => {
delete headersObject[k]; //delete incase of case change
if(v) { headersObject[name] = v } //re-add with requested name & value
if(v || v === '') { headersObject[name] = v } //re-add with requested name & value
}
if(matchingKeys.length == 0) {
updateKey(name, value)