I have the folowing code, when i use statusCode 200 it adds cookie but redirect doesnot work. When i use 304 it redirects but cookie is not set. How can i do both ? Is it possible ?
const response = {
statusCode: 200,
headers: {
"Access-Control-Allow-Origin" : "*",
"Access-Control-Allow-Credentials" : true,
"Set-Cookie": 'data=dflsdjfhlsd',
"Location":"http://127.0.0.1:8040/#/dashboard",
},
body: JSON.stringify({
message: data,
}),
};
callback(null, response);