Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions agentlightning/verl/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ def _start_proxy_server_v0(self):

@app.route("/v1/<path:path>", methods=["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"])
def proxy(path: str): # type: ignore
# Authorization check: require valid authorization before proxying requests
auth_header = request.headers.get("Authorization", "")
if not auth_header or not auth_header.startswith("Bearer "):
abort(401, description="Unauthorized: Valid authorization token required.")

if not self.backend_llm_server_addresses:
abort(503, description="No backend LLM servers available.")

Expand Down