Skip to content

Commit 64837eb

Browse files
authored
Merge pull request #7 from sammcj/healthcheckkey
fix(healthcheck): dont require api key for /health
2 parents ade8736 + 3445285 commit 64837eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

optillm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
@app.before_request
5757
def check_api_key():
5858
if server_config['api_key']:
59+
if request.path == "/health":
60+
return
61+
5962
auth_header = request.headers.get('Authorization')
6063
if not auth_header or not auth_header.startswith('Bearer '):
6164
return jsonify({"error": "Invalid Authorization header. Expected format: 'Authorization: Bearer YOUR_API_KEY'"}), 401

0 commit comments

Comments
 (0)