Skip to content

Configurable origin cookie #20

Description

@basmasking

Description:
The current OriginMiddleware determines the request origin and sets a secure cookie in the browser. While this works correctly for Chromium-based browsers and Firefox, it fails in Safari. This is because Safari does not treat http://localhost as a secure context, and subsequently refuses to set cookies marked as Secure.

Consequently, applications relying on this origin cannot function properly during local development on Safari.

Proposed Change:
To support development across all browsers, we should make the cookie attributes configurable at the application level. We propose adding options for:

  • path
  • sameSite
  • secure (allowing it to be set to false for local dev)

We will continue to default httpOnly to true for the time being.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions