samesite cookie nodejs

Solutions on MaxInterview for samesite cookie nodejs by the best coders in the world

showing results for - "samesite cookie nodejs"
Théophile
16 Nov 2019
1// Set a same-site cookie for first-party contexts
2response.cookie('cookie1', 'value1', { sameSite: 'lax' });
3// Set a cross-site cookie for third-party contexts
4response.cookie('cookie2', 'value2', { sameSite: 'none', secure: true });
Ilaria
21 Oct 2019
1response.setHeader('set-cookie', [
2  'cookie1=value1; SameSite=Lax',
3  'cookie2=value2; SameSite=None; Secure',
4]);