mainmatter/ember-cookies

clearAllCookies doesn't seem to work in headless Chrome 68

zeppelin opened this issue · 5 comments

Adding path=/ seems to fix the issue:

- document.cookie = `${cookieName}=; expires=${new Date(0).toUTCString()}`;
+ document.cookie = `${cookieName}=; expires=${new Date(0).toUTCString()};path=/`;

Hm, when you're not writing the cookie for a specific path it should actually also not be necessary to include the path when clearing. However, I think we should support some of the arguments we support for regular writing for clearing as well - specifically path, domain and secure.

Would you submit a PR adding support for those?

Happy to do that! I'm just not an expert in cookies, that's why I only reported the issue and not submitted the PR already :)

Awesome! Let me know if you need help.

@marcoow could you please review #197?

any chance @marcoow could cut a new release to include #197? This particular issue just bit me as well. For whatever reason, headless chrome (in test contexts only, works ok using it on the CLI), seems to require the path option for clearing.