Skip to content

Commit

Permalink
fix username query
Browse files Browse the repository at this point in the history
  • Loading branch information
devksingh4 committed Jul 20, 2024
1 parent 49eccb8 commit e9626a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def lambda_handler(event: dict, context: LambdaContext) -> dict:
else:
full_path = ctx["path"]
try:
username = app.current_event.request_context.authorizer["username"]
username = event["requestContext"]["authorizer"]["username"]
except Exception:
username = "public@acm.illinois.edu"
log_string = f"REQUEST LOG - START - [{ctx['requestId']}] {ctx['identity']['sourceIp']}: {({username})} - [{ctx['requestTime']}] \"{ctx['httpMethod']} {full_path} {ctx['protocol']}\" {ctx['identity']['userAgent']}"
Expand Down

0 comments on commit e9626a2

Please sign in to comment.