From 629097275f39b76ff0ca74dd491f80348d942cff Mon Sep 17 00:00:00 2001 From: extreme4all <40169115+extreme4all@users.noreply.github.com> Date: Wed, 9 Oct 2024 00:52:00 +0200 Subject: [PATCH] add head response on root path --- src/core/server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/server.py b/src/core/server.py index 3bcbe25..53705c5 100644 --- a/src/core/server.py +++ b/src/core/server.py @@ -39,7 +39,10 @@ def create_app() -> FastAPI: app = create_app() - +@app.head("/") +def root(request: Request): + return {"hello":"world"} + @app.get("/") def root(request: Request): return RedirectResponse(request.url_for("home"))