samesite cookie nodejs

JavaScript
// Set a same-site cookie for first-party contexts
response.cookie('cookie1', 'value1', { sameSite: 'lax' });
// Set a cross-site cookie for third-party contexts
response.cookie('cookie2', 'value2', { sameSite: 'none', secure: true });response.setHeader('set-cookie', [
  'cookie1=value1; SameSite=Lax',
  'cookie2=value2; SameSite=None; Secure',
]);
Source

Also in JavaScript: