Skip to content

Support multiple Allowed Origins in CORS #1006

Closed
@straygar

Description

@straygar

Is your feature request related to a problem? Please describe.
In some cases, we would like to support multiple origins in CORS when defining an API Gateway/ALB event handler (e.g. support calling an API from "localhost" in dev, or webapps living in different origins calling the same API).

Describe the solution you'd like
Allow providing a list of origins CORSConfig(allow_origins=[]) (source). If the client's Origin is in that list, that value is returned in the response header. Otherwise - an arbitrary (e.g. 1st) value from the list can be returned.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions