diff --git a/app/core/config.py b/app/core/config.py index e7c7a21..e5b20d2 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -31,8 +31,6 @@ class Settings(BaseSettings): EMAIL_USE_TLS: bool = True # ================================ - host: str = 'localhost' - class Config: env_file = 'infra/.env' extra = "ignore" diff --git a/app/main.py b/app/main.py index 7991366..a0da043 100644 --- a/app/main.py +++ b/app/main.py @@ -2,7 +2,6 @@ import sys from fastapi import FastAPI, applications -from fastapi.middleware.cors import CORSMiddleware from fastapi.openapi.docs import get_swagger_ui_html from sqladmin import Admin @@ -43,15 +42,6 @@ def swagger_monkey_patch(*args, **kwargs): openapi_url="/api/openapi.json", ) -origins = [f'http://{settings.host}'] - -app.add_middleware( - CORSMiddleware, - allow_origins=origins, - allow_credentials=True, - allow_methods=['*'], - allow_headers=['*'], -) if "pytest" not in sys.modules: app.add_middleware(LoggerMiddleware)