Given this object:
{
"body": "{}",
"headers": {
"access-control-allow-origin": undefined,
"content-type": "application/json; charset=utf-8",
},
"statusCode": 200
}
I would like to do:
const allowCORS = false;
immutable(obj)
.set('headers.access-control-allow-origin', '*', allowCORS)
.value();
And get this as result value
{
"body": "{}",
"headers": {
"content-type": "application/json; charset=utf-8",
},
"statusCode": 200
}
Instead of
{
"body": "{}",
"headers": {
"access-control-allow-origin": undefined,
"content-type": "application/json; charset=utf-8",
},
"statusCode": 200
}
Given this object:
{ "body": "{}", "headers": { "access-control-allow-origin": undefined, "content-type": "application/json; charset=utf-8", }, "statusCode": 200 }I would like to do:
And get this as result value
{ "body": "{}", "headers": { "content-type": "application/json; charset=utf-8", }, "statusCode": 200 }Instead of
{ "body": "{}", "headers": { "access-control-allow-origin": undefined, "content-type": "application/json; charset=utf-8", }, "statusCode": 200 }