Skip to content

Commit

Permalink
Removed github auth requirements in development mode
Browse files Browse the repository at this point in the history
Signed-off-by: AyishikD <[email protected]>
  • Loading branch information
AyishikD committed Sep 12, 2024
1 parent e908b25 commit 2dc2542
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/teuthology_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ def read_root(request: Request):
GET route for root.
"""
return {"root": "success", "session": request.session.get("user", None)}


if DEPLOYMENT == "development":
app.add_middleware(CORSMiddleware,
app.add_middleware(
CORSMiddleware,
allow_origins=[PULPITO_URL, PADDLES_URL],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)

if SESSION_SECRET_KEY:
app.add_middleware(SessionMiddleware, secret_key=SESSION_SECRET_KEY)
else:
Expand Down

0 comments on commit 2dc2542

Please sign in to comment.