Skip to content

Commit

Permalink
Agents: validate auth
Browse files Browse the repository at this point in the history
  • Loading branch information
lusmoura committed Jul 19, 2024
1 parent 8283345 commit 02318a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/backend/config/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ class RouterName(StrEnum):
],
"auth": [
Depends(get_session),
# TODO: Add if the router's have to have authorization
# Depends(validate_authorization),
Depends(validate_authorization),
],
},
RouterName.DEFAULT_AGENT: {
Expand All @@ -109,8 +108,7 @@ class RouterName(StrEnum):
],
"auth": [
Depends(get_session),
# TODO: Add if the router's have to have authorization
# Depends(validate_authorization),
Depends(validate_authorization),
],
},
RouterName.SNAPSHOT: {
Expand Down
1 change: 0 additions & 1 deletion src/backend/routers/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ async def chat_stream(
trace_id = None
if hasattr(request.state, "trace_id"):
trace_id = request.state.trace_id
print("trace_id", trace_id)

user_id = request.headers.get("User-Id", None)
agent_id = chat_request.agent_id
Expand Down

0 comments on commit 02318a6

Please sign in to comment.