Skip to content

Commit fdfce70

Browse files
Adds healthcheck (#13)
1 parent 87733dc commit fdfce70

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

main.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from fastapi import FastAPI, Response, status
1+
from fastapi import FastAPI, Response, status, responses
22

33
app = FastAPI()
44

@@ -28,3 +28,9 @@ def resolve_kratos_admin(body, response):
2828

2929
response.status_code = status.HTTP_403_FORBIDDEN
3030
return {"status": "not authorized"}
31+
32+
33+
@app.get("/healthcheck")
34+
def healthcheck() -> responses.PlainTextResponse:
35+
headers = {"APP": "OK"}
36+
return responses.PlainTextResponse("OK", headers=headers)

0 commit comments

Comments
 (0)