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

Secure Cookies can't be deleted from Responses #728

Open
fea17e86 opened this issue Dec 7, 2023 · 0 comments
Open

Secure Cookies can't be deleted from Responses #728

fea17e86 opened this issue Dec 7, 2023 · 0 comments

Comments

@fea17e86
Copy link

fea17e86 commented Dec 7, 2023

Bug Report

Current behavior

Using ResponseCookies.delete({ name: '__Secure-some-cookie', secure: true }) to delete a secure cookie fails. The cookie simply doesn't get deleted.

Expected behavior/code

The cookie should get deleted.

Possible solution

Pass all options given to delete to the contained set call.

Additional context/screenshots

Investigating the code, I found that the secure flag, that can be passed as an option to delete isn't passed to the set call.

return this.set({ name, path, domain, value: '', expires: new Date(0) })

In general, please don't offer parameters for the function that have 0 influence on the execution.

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

No branches or pull requests

1 participant