Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

digitaldonkey
Copy link
Contributor

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.

Copy link
Owner

@garris garris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks.

Copy link
Owner

@garris garris left a 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",
Copy link
Owner

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}`;
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants