Skip to content

@trpc/server - Handling CORS and CORS preflight requests #623

@lleyton

Description

@lleyton

When using the standalone server, it might be useful to handle CORS preflight requests. Currently the request just falls with a 405, Method Not Allowed. I'm proposing the addition of a cors field on the CreateHttpHandlerOptions object, which would contain an array of allowed origins, or a boolean of whether to allow all origins. Thoughts?

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