bareasgi_cors¶
class CORSMiddleware ¶
Summary¶
Construct the CORS middleware
bareasgi_cors.cors_provider.CORSMiddleware(
) -> None
*,
allow_origins: Optional[AbstractSet[str]],
allow_methods: Optional[AbstractSet[str]],
allow_headers: Optional[AbstractSet[str]],
allow_credentials: bool,
allow_origin_regex: Optional[str],
expose_headers: AbstractSet[str],
max_age: int
Parameters¶
allow_origins: Optional[AbstractSet[str]]An optional set of the allowed origins, or None for any origin.. Defaults to None.
An optional set of allowed methods, or None for all methods. Defaults to None.
An optional set of allowed headers, or None for all headers. Defaults to None.
If True allow credentials, otherwise disallow. Defaults to False.
An optional regex pattern to apply to origins. Defaults to None.
An optional set of headers to expose. Defaults to None.
The maximum age in seconds. Defaults to 600.