Add API_KEY checking

This commit is contained in:
2021-11-14 10:58:52 +03:00
parent 6a7966ed92
commit 122eab7394
11 changed files with 37 additions and 6 deletions

View File

@@ -0,0 +1,4 @@
from fastapi.security import APIKeyHeader
default_security = APIKeyHeader(name="Authorization")

View File

@@ -2,6 +2,8 @@ from pydantic import BaseSettings
class EnvConfig(BaseSettings):
API_KEY: str
POSTGRES_USER: str
POSTGRES_PASSWORD: str
POSTGRES_HOST: str