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.