mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 03:51:52 +08:00
flask-cors.decorator: allow re.Pattern objects to origins and allow_headers parameters (#7782)
This commit is contained in:
committed by
GitHub
parent
46fc7768c4
commit
0b5213a213
@@ -1,7 +1,7 @@
|
||||
from collections.abc import Callable
|
||||
from datetime import timedelta
|
||||
from logging import Logger
|
||||
from typing import Any
|
||||
from typing import Any, Iterable, Pattern
|
||||
from typing_extensions import ParamSpec
|
||||
|
||||
_P = ParamSpec("_P")
|
||||
@@ -10,10 +10,10 @@ LOG: Logger
|
||||
|
||||
def cross_origin(
|
||||
*args: Any,
|
||||
origins: str | list[str] | None = ...,
|
||||
origins: str | Pattern[str] | Iterable[str | Pattern[str]] | None = ...,
|
||||
methods: str | list[str] | None = ...,
|
||||
expose_headers: str | list[str] | None = ...,
|
||||
allow_headers: str | list[str] | None = ...,
|
||||
allow_headers: str | Pattern[str] | Iterable[str | Pattern[str]] | None = ...,
|
||||
supports_credentials: bool | None = ...,
|
||||
max_age: timedelta | int | str | None = ...,
|
||||
send_wildcard: bool | None = ...,
|
||||
|
||||
Reference in New Issue
Block a user