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

[Feat]: Add Cookie's config option to set secure flag manually #714

Closed
LuksAO opened this issue Jul 29, 2024 · 1 comment
Closed

[Feat]: Add Cookie's config option to set secure flag manually #714

LuksAO opened this issue Jul 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@LuksAO
Copy link

LuksAO commented Jul 29, 2024

Description

When the Cookie is set in a parent domain, if the cookie is set in a domain with https, since it uses secure tag, it can not be accessed from http domains.

Then in http domains the cookie is shown again and again cause it can not be accessed nor set.

This behavior makes sense since you can't set a secure cookie in http but you should have an alternative for these cases.

Proposed solution

Add a 'secure' boolean property in 'Cookie' interface.

Default can be 'true' maintaining current behavior (secure flag on if https and false if http).

If 'secure' is false then secure flag is never set.

Alternatively default value and current behavior can be undefined and when secure is true it may try to force secure flag.

Additional details

No response

@LuksAO LuksAO added enhancement New feature or request triage yet to be reviewed labels Jul 29, 2024
@orestbida
Copy link
Owner

Seems like a good addition to me.

@orestbida orestbida removed the triage yet to be reviewed label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants