Skip to content

Commit 38b9d90

Browse files
Merge pull request #1650 from roboflow/fix/healthz-should-not-return-401
Healthz and Readiness should not be authed
2 parents 246cada + ac5bed1 commit 38b9d90

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

inference/core/interfaces/http/http_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,9 @@ async def check_authorization_serverless(request: Request, call_next):
458458
"/",
459459
"/docs",
460460
"/info",
461+
"/healthz", # health check endpoint for liveness probe
462+
"/readiness",
463+
"/metrics",
461464
"/openapi.json", # needed for /docs and /redoc
462465
"/model/registry", # dont auth this route, usually not used on serverlerless, but queue based serverless uses it internally (not accessible from outside)
463466
]
@@ -538,6 +541,9 @@ async def check_authorization(request: Request, call_next):
538541
"/docs",
539542
"/redoc",
540543
"/info",
544+
"/healthz", # health check endpoint for liveness probe
545+
"/readiness",
546+
"/metrics",
541547
"/openapi.json", # needed for /docs and /redoc
542548
]
543549
or request.url.path.startswith("/static/")

0 commit comments

Comments
 (0)