|
|
|
@ -1,4 +1,4 @@
|
|
|
|
from typing import Optional
|
|
|
|
from typing import Annotated, Optional
|
|
|
|
|
|
|
|
|
|
|
|
from pydantic import AliasChoices, Field, HttpUrl, NegativeInt, NonNegativeInt, PositiveInt, computed_field
|
|
|
|
from pydantic import AliasChoices, Field, HttpUrl, NegativeInt, NonNegativeInt, PositiveInt, computed_field
|
|
|
|
from pydantic_settings import BaseSettings
|
|
|
|
from pydantic_settings import BaseSettings
|
|
|
|
@ -217,20 +217,17 @@ class HttpConfig(BaseSettings):
|
|
|
|
def WEB_API_CORS_ALLOW_ORIGINS(self) -> list[str]:
|
|
|
|
def WEB_API_CORS_ALLOW_ORIGINS(self) -> list[str]:
|
|
|
|
return self.inner_WEB_API_CORS_ALLOW_ORIGINS.split(",")
|
|
|
|
return self.inner_WEB_API_CORS_ALLOW_ORIGINS.split(",")
|
|
|
|
|
|
|
|
|
|
|
|
HTTP_REQUEST_MAX_CONNECT_TIMEOUT: NonNegativeInt = Field(
|
|
|
|
HTTP_REQUEST_MAX_CONNECT_TIMEOUT: Annotated[
|
|
|
|
description="",
|
|
|
|
PositiveInt, Field(ge=10, description="connect timeout in seconds for HTTP request")
|
|
|
|
default=300,
|
|
|
|
] = 10
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HTTP_REQUEST_MAX_READ_TIMEOUT: NonNegativeInt = Field(
|
|
|
|
HTTP_REQUEST_MAX_READ_TIMEOUT: Annotated[
|
|
|
|
description="",
|
|
|
|
PositiveInt, Field(ge=60, description="read timeout in seconds for HTTP request")
|
|
|
|
default=600,
|
|
|
|
] = 60
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HTTP_REQUEST_MAX_WRITE_TIMEOUT: NonNegativeInt = Field(
|
|
|
|
HTTP_REQUEST_MAX_WRITE_TIMEOUT: Annotated[
|
|
|
|
description="",
|
|
|
|
PositiveInt, Field(ge=10, description="read timeout in seconds for HTTP request")
|
|
|
|
default=600,
|
|
|
|
] = 20
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HTTP_REQUEST_NODE_MAX_BINARY_SIZE: PositiveInt = Field(
|
|
|
|
HTTP_REQUEST_NODE_MAX_BINARY_SIZE: PositiveInt = Field(
|
|
|
|
description="",
|
|
|
|
description="",
|
|
|
|
|