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

Cannot clear cookies with http nodes

This commit is contained in:
Nick O'Leary 2016-07-23 22:41:16 +01:00
parent e81e48cde3
commit 7c6e8eeefc

View File

@ -263,9 +263,9 @@ module.exports = function(RED) {
if (msg.cookies.hasOwnProperty(name)) {
if (msg.cookies[name] === null || msg.cookies[name].value === null) {
if (msg.cookies[name]!==null) {
msg.res._res.clearCookie('name',msg.cookies[name]);
msg.res._res.clearCookie(name,msg.cookies[name]);
} else {
msg.res._res.clearCookie('name');
msg.res._res.clearCookie(name);
}
} else if (typeof msg.cookies[name] === 'object') {
msg.res._res.cookie(name,msg.cookies[name].value,msg.cookies[name]);