Skip to content

Commit

Permalink
Fix missing samesite cookie attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Favo02 authored and rgrinberg committed Jun 12, 2024
1 parent 24caae6 commit 04d6fee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions opium/src/cookie.ml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,12 @@ let to_set_cookie_header t =
| None -> v
| Some domain -> Printf.sprintf "%s; Domain=%s" v domain
in
let v =
match t.same_site with
| `None -> Printf.sprintf "%s; SameSite=None" v
| `Strict -> Printf.sprintf "%s; SameSite=Strict" v
| `Lax -> Printf.sprintf "%s; SameSite=Lax" v
in
let v =
match t.expires with
| `Date ptime ->
Expand Down

0 comments on commit 04d6fee

Please sign in to comment.