mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-07-07 11:27:50 +02:00
root redirect
This commit is contained in:
@@ -32,5 +32,14 @@ router.include_router(gemini_gateway, prefix="/gateway", tags=["gemini_gateway"]
|
||||
app.include_router(router)
|
||||
|
||||
|
||||
# on / redirect to https://explorer.invariantlabs.ai/docs/gateway
|
||||
@app.get("/", include_in_schema=False)
|
||||
async def redirect_to_explorer():
|
||||
"""Redirect to the explorer"""
|
||||
return fastapi.responses.RedirectResponse(
|
||||
url="https://explorer.invariantlabs.ai/docs/gateway"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
uvicorn.run(app, host="0.0.0.0", port=8000)
|
||||
|
||||
Reference in New Issue
Block a user