diff --git a/.env_debug b/.env_debug index 2aec99c..73c998f 100644 --- a/.env_debug +++ b/.env_debug @@ -1,7 +1,5 @@ DEBUG=true - -SESSION_KEY=debug -CSRF_KEY=debug +SECRET_KEY=debug APP_HOST=127.0.0.1 APP_PORT=8000 diff --git a/app/common.py b/app/common.py index d440dcb..6ebcc1a 100644 --- a/app/common.py +++ b/app/common.py @@ -18,8 +18,7 @@ static_dir = str( # Main configuration class Settings(BaseSettings): debug: bool = False - session_key: str = secrets.token_hex(32) - csrf_key: str = secrets.token_hex(32) + secret_key: str = secrets.token_hex(32) app_host: str = '127.0.0.1' app_port: int = 8000 diff --git a/app/main.py b/app/main.py index cb7a407..3b83319 100644 --- a/app/main.py +++ b/app/main.py @@ -42,9 +42,9 @@ for p in paths: # Add WTForms CSRF protection middlewares app.add_middleware( SessionMiddleware, - secret_key=common.settings.session_key, + secret_key=common.settings.secret_key, ) app.add_middleware( CSRFProtectMiddleware, - csrf_secret=common.settings.csrf_key, + csrf_secret=common.settings.secret_key, ) diff --git a/docker-compose.yml b/docker-compose.yml index 20f5392..8a90be8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,4 +27,3 @@ services: interval: 1s timeout: 3s retries: 20 - start_period: 10s diff --git a/requirements.txt b/requirements.txt index a3d4155..3b5e782 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -fastapi~=0.92.0 +fastapi~=0.93.0 starlette~=0.25.0 -pydantic~=1.10.5 +pydantic~=1.10.6 uvicorn[standard]~=0.20.0 gunicorn~=20.1.0