Skip to content

[Bug]: Playwright 1.56 no longer sends Origin header, breaking CORS-dependent requests #37769

@arturpopichenko

Description

@arturpopichenko

Version

1.56

Steps to reproduce

After upgrading Playwright from 1.55 → 1.56, several UI tests started failing.

In Playwright 1.55, the browser automatically included the Origin header in network requests, which matched our backend CORS configuration.
Starting from 1.56, this header is no longer sent — as a result, the backend now rejects the requests (CORS preflight fails, or the request is treated as unauthenticated).

Image

Expected behavior

The Origin header should be preserved in requests, or at least there should be a configuration option to enable/disable this behavior.

Actual behavior

Requests no longer include Origin ( and also
sec-fetch-mode: cors
sec-fetch-site: cross-site
)
, causing the backend to block or reject them.

Additional context

request headers are missed:

Origin
sec-fetch-mode: cors
sec-fetch-site: cross-site

Environment

OS: MacOS
Playwright: "@playwright/test": "1.56.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions