Use header to expose healthcheck status instead of status code
This is mostly to prevent it sending me emails on every GET of the page when erroring
This commit is contained in:
parent
e4c6fab011
commit
0e486babb7
@ -88,5 +88,5 @@ def healthcheck(request: HttpRequest):
|
|||||||
return HttpResponse(
|
return HttpResponse(
|
||||||
("OK: " if all_ok else "CRITICAL: ") + "\n".join(messages),
|
("OK: " if all_ok else "CRITICAL: ") + "\n".join(messages),
|
||||||
content_type="text/plain",
|
content_type="text/plain",
|
||||||
status=200 if all_ok else 500,
|
headers={"X-CMSManage-Status": "OK"},
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user