-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Rationale
Antikythera.Http.SetCookie lacks the option to set the SameSite attribute of Set-Cookie header, and now it is forced into using SameSite=Lax.
As my team and I came across a need to set the SameSite directive to SameSite=none (especially in combination with Antikythera.Session), I am raising this issue and proposing the addition of this functionality. This would also help gears that want to enforce SameSite=strict.
Proposed changes
- Add
same_sitefield toAntikythera.Http.SetCookie- This will be an enum that takes either
:lax,:strict, or:none - Adding a field under the SetCookie module's field list and adding a type would do this
- I am ready to write up a patch for this change
- This will be an enum that takes either
- Add an interface to
Antikythera.Plug.Session.load/2- When explicitly adding a Cookie entry, passing an optional argument to
Antikythera.Conn.put_resp_cookie/4can achieve this - But when used in combination with
Antikythera.Plug.Session.load/2it is not trivial, so I would like advice on how to change this- As of right now, I am thinking of passing options under
:set_cookiekey, then passing this option tomake_before_send/2(this would add an argument and thus change the signature tomake_before_send/3) so that it can be passed ontoAntikythera.Conn.put_resp_cookie/4(now called with only 3 arguments).
- As of right now, I am thinking of passing options under
- When explicitly adding a Cookie entry, passing an optional argument to
Relevant references
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels