Map the Secure field in both cookieToPlaywrightOptionalCookie and playwrightCookieToCookie — previously it was silently dropped, causing cookies with __Secure-/__Host- prefixes to be rejected by Chromium
Replace the batch AddCookies call with one-by-one cookie adding, logging slog.Warn on failure instead of failing browser creation entirely
Add 5 unit tests for the conversion functions covering Secure true/false and edge cases
## Summary
- Map the `Secure` field in both `cookieToPlaywrightOptionalCookie` and `playwrightCookieToCookie` — previously it was silently dropped, causing cookies with `__Secure-`/`__Host-` prefixes to be rejected by Chromium
- Replace the batch `AddCookies` call with one-by-one cookie adding, logging `slog.Warn` on failure instead of failing browser creation entirely
- Add 5 unit tests for the conversion functions covering `Secure` true/false and edge cases
Closes #75
The Secure field was dropped in both Playwright<->internal cookie
conversion functions, causing cookies with __Secure-/__Host- prefixes
to be rejected by Chromium. Additionally, batch AddCookies meant one
invalid cookie would fail browser creation entirely.
Changes:
- Map Secure field in cookieToPlaywrightOptionalCookie and
playwrightCookieToCookie
- Add cookies one-by-one with slog.Warn on failure instead of
failing the entire batch
- Add unit tests for both conversion functions
Closes#75
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Securefield in bothcookieToPlaywrightOptionalCookieandplaywrightCookieToCookie— previously it was silently dropped, causing cookies with__Secure-/__Host-prefixes to be rejected by ChromiumAddCookiescall with one-by-one cookie adding, loggingslog.Warnon failure instead of failing browser creation entirelySecuretrue/false and edge casesCloses #75