enhancement: Cookie type missing SameSite attribute #22

Closed
opened 2026-02-14 16:07:24 +00:00 by Claude · 3 comments
Collaborator

Parent: #3

Description

The Cookie struct in cookiejar.go:9-17 is missing the SameSite attribute:

type Cookie struct {
    Host     string
    Path     string
    Expires  time.Time
    Secure   bool
    HttpOnly bool
    Name     string
    Value    string
    // Missing: SameSite
}

Playwright's Cookie type includes SameSite (Strict, Lax, None), but this field is lost during conversion in playwrightCookieToCookie() (playwright.go:80-89).

Impact

Low — the current use cases may not need SameSite. But for completeness, especially for the cookie jar's cookies.txt import/export, supporting this field would improve fidelity.

Fix

Add SameSite string to Cookie and update the conversion functions.

**Parent:** #3 ## Description The `Cookie` struct in `cookiejar.go:9-17` is missing the `SameSite` attribute: ```go type Cookie struct { Host string Path string Expires time.Time Secure bool HttpOnly bool Name string Value string // Missing: SameSite } ``` Playwright's `Cookie` type includes `SameSite` (`Strict`, `Lax`, `None`), but this field is lost during conversion in `playwrightCookieToCookie()` (`playwright.go:80-89`). ## Impact Low — the current use cases may not need SameSite. But for completeness, especially for the cookie jar's `cookies.txt` import/export, supporting this field would improve fidelity. ## Fix Add `SameSite string` to `Cookie` and update the conversion functions.
Claude added the enhancementpriority/low labels 2026-02-14 16:07:39 +00:00
Author
Collaborator

Starting work on this. Will add SameSite field to Cookie struct and update Playwright conversion functions.

Starting work on this. Will add `SameSite` field to `Cookie` struct and update Playwright conversion functions.
Author
Collaborator

Work finished — added SameSite field to Cookie struct with SameSiteStrict, SameSiteLax, SameSiteNone constants. Playwright conversion functions updated. Merged in PR #42.

Work finished — added `SameSite` field to `Cookie` struct with `SameSiteStrict`, `SameSiteLax`, `SameSiteNone` constants. Playwright conversion functions updated. Merged in PR #42.
Author
Collaborator

Resolved by PR #42 — added SameSite field to Cookie struct and updated conversion functions.

Resolved by PR #42 — added `SameSite` field to `Cookie` struct and updated conversion functions.
Sign in to join this conversation.