File tree Expand file tree Collapse file tree 4 files changed +50
-731
lines changed
Expand file tree Collapse file tree 4 files changed +50
-731
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ def server_host(self) -> str:
6060 BACKEND_CORS_ORIGINS : Annotated [
6161 list [AnyUrl ] | str , BeforeValidator (parse_cors )
6262 ] = []
63+ BACKEND_CORS_ORIGIN_REGEXP : str | None = None
6364
6465 PROJECT_NAME : str = "TiDB.AI"
6566 SENTRY_DSN : HttpUrl | None = None
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ async def lifespan(app: FastAPI):
9393 allow_origins = [
9494 str (origin ).strip ("/" ) for origin in settings .BACKEND_CORS_ORIGINS
9595 ],
96+ allow_origin_regex = settings .BACKEND_CORS_ORIGIN_REGEXP ,
9697 allow_credentials = True ,
9798 allow_methods = ["*" ],
9899 allow_headers = ["*" ],
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ authors = [
77 { name = " mini256" , email = " minianter@gmail.com" }
88]
99readme = " README.md"
10- requires-python = " >= 3.9 "
10+ requires-python = " >= 3.10 "
1111dependencies = [
1212 " fastapi>=0.115.6" ,
1313 " fastapi-cli>=0.0.5" ,
You can’t perform that action at this time.
0 commit comments