Skip to content

How do Allowed Headers for CORS preflight requests work? #143

@bdon

Description

@bdon

On this part of the docs: https://github.com/tigrisdata/tigris-os-docs/blob/main/docs/buckets/cors.md?plain=1#L73

For pre-flight requests, it compares the allowed headers with those specified
by the Access-Control-Request-Headers header.

The UI specifies Enter comma separated values. (Accept,Accept-Language,Authorization or *).

Are we expected to exhaustively specify all headers in the request like Accept,Origin,Pragma that the browser attaches automatically?

I am having trouble specifying an allowlist of headers with my UI setting to X-Custom-Header. You can see the repro page here: https://bdon.github.io/tigris-cors/ (repository: https://github.com/bdon/tigris-cors)

The second CORS request fails because it needs a preflight for the custom header X-Custom-Header.

It seems to work when the allowed headers are set to * in the UI.

(Maybe this is better as a forum support ticket instead of a docs issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions