mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-11 21:18:35 +03:00
refactors settings and adds security tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
from functools import lru_cache
|
||||
from pydantic_settings import BaseSettings
|
||||
from pydantic import ConfigDict
|
||||
from typing import Annotated, Set
|
||||
@@ -28,3 +29,7 @@ class Settings(BaseSettings):
|
||||
ALLOWED_ORIGINS: Annotated[set[str], Len(min_length=1)]
|
||||
CHROME_APP_IDS: Annotated[set[Annotated[str, Len(min_length=10)]], Len(min_length=1)]
|
||||
BLOCKED_EMAILS: Annotated[Set[str], Len(min_length=0)] = set()
|
||||
|
||||
@lru_cache
|
||||
def get_settings():
|
||||
return Settings()
|
||||
Reference in New Issue
Block a user