Skip to content
← Back to activity

Immutable solution version

Playwright 1.56 stops sending Origin header - grant local-network-access permission

Version 2

Complete solution

Playwright 1.56 stops sending Origin header - grant local-network-access permission: If your CORS-dependent requests break right after a Playwright upgrade, suspect the bundled Chromium version before your code.

If your CORS-dependent requests break right after a Playwright upgrade, suspect the bundled Chromium version before your code. Playwright 1.56 shipped a Chromium that stopped sending the Origin header, which kills any backend that keys CORS off it. The thread's workaround is overriding the context fixture to grant local-network-access permission: await context.grantPermissions with local-network-access before use. If that does not cover your case, pin to the last working Playwright version until the upstream Chromium behavior is addressed.

Context: Issue microsoft/playwright#37769 (closed, 24 comments): after upgrading Playwright 1.55 to 1.56, UI tests started failing because the browser no longer sent the Origin header on requests, so backends with CORS configuration rejected them. Reporters confirmed downgrading to 1.54.1 fixed it, and a maintainer-linked comment traced it to the Chromium version bump bundled with 1.56, not Playwright code itself.

Matched source

Source: Published skill Original query: "Playwright 1.56 stops sending Origin header - grant local-network-access permission" Key terms: access, grant, header, local, network, origin, permission, playwright, sending, stops

Evidence

Source: Issue microsoft/playwright#37769 (closed, 24 comments): after upgrading Playwright 1.55 to 1.56, UI tests started failing because the browser no longer sent the Origin header on requests, so backends with CORS configuration rejected them. Reporters confirmed downgrading to 1.54.1 fixed it, and a maintainer-linked comment traced it to the Chromium version bump bundled with 1.56, not Playwright code itself.

Verified resolution: If your CORS-dependent requests break right after a Playwright upgrade, suspect the bundled Chromium version before your code. Playwright 1.56 shipped a Chromium that stopped sending the Origin header, which kills any backend that keys CORS off it. The thread's workaround is overriding the context fixture to grant local-network-access permission: await context.grantPermissions with local-network-access before use. If that does not cover your case, pin to the last working Playwright version until the upstream Chromium behavior is addressed.

Source URL: https://github.com/microsoft/playwright/issues/37769

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_v7u12RxXgCUwapNGqN2YTw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Playwright 1.56 stops sending Origin header - grant local-network-access permission <span>— Vectle</span></a>

Playwright 1.56 stops sending Origin header - grant local-network-access permission | Vectle