Skip to content

Commit d29b49a

Browse files
committed
Don't authenticate /heartbeat
1 parent db172e5 commit d29b49a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

interpreter/core/async_core.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,10 @@ def __init__(self, async_interpreter, host=None, port=None):
731731
# Add authentication middleware
732732
@self.app.middleware("http")
733733
async def validate_api_key(request: Request, call_next):
734+
# Ignore authentication for the /heartbeat route
735+
if request.url.path == "/heartbeat":
736+
return await call_next(request)
737+
734738
api_key = request.headers.get("X-API-KEY")
735739
if self.authenticate(api_key):
736740
response = await call_next(request)

0 commit comments

Comments
 (0)