Вынес CORS в переменную окружения
This commit is contained in:
parent
9b58e09f37
commit
20d7939f14
@ -25,12 +25,11 @@ def start_app():
|
||||
|
||||
api_app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=['https://api.visus.numerum.team', 'https://visus.numerum.team', 'http://localhost:5173'],
|
||||
allow_origins=[settings.ALLOWED_ORIGIN],
|
||||
allow_credentials=True,
|
||||
allow_methods=['*'],
|
||||
allow_headers=['*'],
|
||||
)
|
||||
# api_app.add_middleware(MaintenanceModeMiddleware, enable_maintenance=False)
|
||||
|
||||
api_app.include_router(appointment_files_router, prefix=f'{settings.APP_PREFIX}/appointment_files',
|
||||
tags=['appointment_files'])
|
||||
|
||||
@ -13,6 +13,7 @@ class Settings(BaseSettings):
|
||||
BACKUP_DB_URL: str
|
||||
PG_DUMP_PATH: str
|
||||
SCHEMA: str = 'public'
|
||||
ALLOWED_ORIGIN: str = '*'
|
||||
|
||||
class Config:
|
||||
env_file = '.env'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user