add a healthcheck for load balancers

This commit is contained in:
Thomas Steinert
2023-04-05 16:59:47 +02:00
parent d0cb88a19e
commit bf8db5d151
3 changed files with 29 additions and 0 deletions

View File

@@ -18,6 +18,11 @@ async def matrix_webhook(request):
This one handles a POST, checks its content, and forwards it to the matrix room.
"""
LOGGER.debug(f"Handling {request=}")
# healthcheck
if request.rel_url.path == "/health":
return utils.create_json_response(HTTPStatus.OK, "OK")
data_b = await request.read()
try: