Skip to content

Commit d49ad62

Browse files
committed
feat: add rate limiter
1 parent a920d07 commit d49ad62

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/core/config/setting.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from functools import lru_cache
22

3-
from pydantic_settings import BaseSettings
3+
from pydantic_settings import BaseSettings, SettingsConfigDict
44

55

66
class Settings(BaseSettings):
@@ -13,8 +13,11 @@ class Settings(BaseSettings):
1313
REFRESH_TOKEN_EXPIRE_MINUTES: int = 10080
1414
RATE_LIMIT: str = "100/minute"
1515

16-
class Config:
17-
env_file = ".env"
16+
model_config = SettingsConfigDict(
17+
env_file=".env",
18+
env_file_encoding="utf-8",
19+
extra="ignore",
20+
)
1821

1922

2023
@lru_cache

0 commit comments

Comments
 (0)