Skip to content

0.7.0 no longer supports .localhost domain value #173

@EvHaus

Description

@EvHaus

After upgrading from 0.6.0 to 0.7.0 this code no longer works:

cookie.serialize('myCookie', 'some content', {
  domain: '.localhost',
  httpOnly: true,
  maxAge: 2147483647,
  path: '/',
  sameSite: 'lax',
  secure: true
});

This now throws option domain is invalid.

According RFC6265 Section 4.1.2.3 a leading . (dot) should be allowed for targeting subdomains. Am I doing something wrong, or is this a possible 0.7.0 bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions