Compare commits

...

1 Commits

Author SHA1 Message Date
Stephen McLaughlin
2ccd4b5224 Allow empty string header value
closes #4789
2024-06-24 10:18:01 +01:00

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)