Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Add a 'cookiePath' property #34

Merged
merged 1 commit into from
May 3, 2017
Merged

Add a 'cookiePath' property #34

merged 1 commit into from
May 3, 2017

Conversation

ghostd
Copy link

@ghostd ghostd commented May 3, 2017

Here is a proposal to add a new "cookiePath" property.

This new property would fix a weird bug on IE: on my SPA (which uses react-router with history API), when the user clicks on the banner to close it, then navigate to another page, sometimes the cookie vanish and the banner is displayed again.

I think the bug is related to this: http://stackoverflow.com/questions/8292449/internet-explorer-sends-the-wrong-cookie-when-the-paths-overlap#8314164

If i force the cookie path to '/', i dont have the bug (and browser-cookie-lite does not force it). So this property let me set the path i wish.

I did not set a default value to not break the current behavior.

@gabro gabro requested a review from FrancescoCioria May 3, 2017 14:05
@gabro
Copy link
Member

gabro commented May 3, 2017

Thanks for this PR! It seems like a reasonable addition and the code looks 👍
I'll leave the final word to @FrancescoCioria

Copy link
Contributor

@FrancescoCioria FrancescoCioria left a comment

Choose a reason for hiding this comment

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

Thank you @ghostd 🎉
I'll release it shortly

@FrancescoCioria FrancescoCioria merged commit 3957dfa into buildo:master May 3, 2017
@nemobot
Copy link

nemobot commented May 3, 2017

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

Successfully merging this pull request may close these issues.

4 participants