-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove cookie domain as it could be munged from scenario url #1258
base: master
Are you sure you want to change the base?
Remove cookie domain as it could be munged from scenario url #1258
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one thought re: domain
property in the cookies.json file.
@@ -1,6 +1,5 @@ | |||
[ | |||
{ | |||
"domain": ".www.yourdomain.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only problem I have here is that this property will be there when using popular plugins to create this JSON file. So, I prefer to leave this as I imagine many users will include this.
cookie.url = cookie.domain; | ||
} else { | ||
cookie.url = 'https://' + cookie.domain; | ||
cookie.url = `${url.protocol}//${url.hostname}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer this way more to what is currently here. I am a little conflicted about using the "magic" hostname since this could differ from the one exported in the cookie-- but I think this is your whole point. So, I am supportive of this because it will probably work more often than not.
When trying to make our our pipeline multi domain compatible we stumbled into the cookie domain setting in provided by default in cookies.json. With a little fix in loadCookies.json you can avoid specifying domain per cookie.
I think it might be a good default setting.