Skip to content

Commit

Permalink
feat: Redirect root to prefix
Browse files Browse the repository at this point in the history
When `CME_ROUTE_PREFIX` is set, redirect root to the prefix.
  • Loading branch information
jamilraichouni committed Feb 20, 2025
1 parent 399599d commit 10db603
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions capella_model_explorer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def metrics() -> t.Any:
)


@app.get("/")
def prefix_redirect() -> t.Any:
return starlette.responses.RedirectResponse(url=c.ROUTE_PREFIX)


@ar.get("/", name="main_home")
def home() -> t.Any:
"""Show home/ landing page with all reports in categories."""
Expand Down

0 comments on commit 10db603

Please sign in to comment.