diff --git a/src/teuthology_api/main.py b/src/teuthology_api/main.py index c1d8afb..93424a2 100644 --- a/src/teuthology_api/main.py +++ b/src/teuthology_api/main.py @@ -34,6 +34,14 @@ def read_root(request: Request): allow_methods=["*"], allow_headers=["*"], ) +else: + app.add_middleware( + CORSMiddleware, + allow_origins=[PULPITO_URL, PADDLES_URL], + allow_credentials=True, + allow_methods=["GET", "POST", "OPTIONS"], + allow_headers=["*"], + ) app.add_middleware(SessionMiddleware, secret_key=SESSION_SECRET_KEY) app.include_router(suite.router)