/ping route support HEAD request method

Allow services like Uptimerobot to monitor the WebUI which uses `HEAD` request method because it is lighter whereas in order to use `GET` method, payment is required.

There's no significant impact for this changes.
This commit is contained in:
dux-helektra
2026-02-18 11:16:21 +08:00
committed by GitHub
parent 22c0af9bb1
commit d7d07bde75
+1 -1
View File
@@ -71,7 +71,7 @@ router_public = APIRouter()
router = APIRouter() router = APIRouter()
@router_public.get("/ping", response_model=Ping, tags=["Info"]) @router_public.api_route("/ping", methods=["GET", "HEAD"], response_model=Ping, tags=["Info"])
def ping(): def ping():
"""simple ping""" """simple ping"""
return {"status": "pong"} return {"status": "pong"}