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

actix-identity: Documentation of http_only() seems incorrect #211

Open
puzzlepaint opened this issue Dec 9, 2021 · 0 comments
Open

actix-identity: Documentation of http_only() seems incorrect #211

puzzlepaint opened this issue Dec 9, 2021 · 0 comments
Labels
A-identity Project: actix-identity C-documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@puzzlepaint
Copy link

The comment on CookieIdentityPolicy::http_only() says "By default, the HttpOnly attribute is omitted from issued cookies":

/// By default, the `HttpOnly` attribute is omitted from issued cookies.

However, it seems to me that the http_only Option defaults to None here in new():

And if the option is None, then the flag is set to true here:

cookie.set_http_only(true);

And won't be changed here:

if let Some(http_only) = self.http_only {

Unless I am overlooking something, it thus seems to me that the documentation is incorrect and should say that the HttpOnly attribute is set by default (or the behavior should be changed to match the documentation).

@robjtede robjtede added C-documentation Improvements or additions to documentation good first issue Good for newcomers A-identity Project: actix-identity labels Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-identity Project: actix-identity C-documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants