Skip to content

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

Open
@puzzlepaint

Description

@puzzlepaint

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-identityProject: actix-identityC-documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions