diff options
Diffstat (limited to 'fatcat_scholar')
-rw-r--r-- | fatcat_scholar/web.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py index dce732b..a268bf8 100644 --- a/fatcat_scholar/web.py +++ b/fatcat_scholar/web.py @@ -84,6 +84,13 @@ api = APIRouter() async def home() -> Any: return {"endpoints": {"/": "this", "/search": "fulltext search"}} +@api.head("/", include_in_schema=False) +async def root_head() -> Any: + """ + HTTP HEAD only for the root path. Requested by, eg, uptime monitoring + tools. This is distinct from the CORS middleware. + """ + return Response() class HitsModel(BaseModel): count_returned: int |