fix: change cookie default from NO_RESTRICTION to LAX_MODE (#31800)
* fix: change default from NO_RESTRICTION to LAX_MODE * chore: update cookie docs, redirect tests
This commit is contained in:
parent
d9e93b3c4b
commit
bf7b245fa0
3 changed files with 6 additions and 2 deletions
|
|
@ -759,14 +759,18 @@ describe('net module', () => {
|
|||
const cookieLocalVal = `${Date.now()}-local`;
|
||||
const localhostUrl = serverUrl.replace('127.0.0.1', 'localhost');
|
||||
expect(localhostUrl).to.not.equal(serverUrl);
|
||||
// cookies with lax or strict same-site settings will not
|
||||
// persist after redirects. no_restriction must be used
|
||||
await Promise.all([
|
||||
sess.cookies.set({
|
||||
url: serverUrl,
|
||||
name: 'wild_cookie',
|
||||
sameSite: 'no_restriction',
|
||||
value: cookie127Val
|
||||
}), sess.cookies.set({
|
||||
url: localhostUrl,
|
||||
name: 'wild_cookie',
|
||||
sameSite: 'no_restriction',
|
||||
value: cookieLocalVal
|
||||
})
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue