Skip to content

Commit

Permalink
[SOCIAL-AUTH]: Add user_agent on response log
Browse files Browse the repository at this point in the history
  • Loading branch information
amadolid authored and ypkang committed Jan 9, 2024
1 parent c026513 commit e02eba2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jaseci_serv/jaseci_serv/jsx_oauth/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def response_log(self, resp):
master = self.user.get_master()
hook = master._h

user_agent = request.META.get("HTTP_USER_AGENT", "")
tot_time = time() - request.start_time
save_count = len(hook.save_obj_list)
touch_count = len(hook.mem.keys())
Expand Down Expand Up @@ -275,6 +276,7 @@ def response_log(self, resp):
"objects_saved": save_count,
"caller_name": master.name,
"caller_jid": master.jid,
"user_agent": user_agent,
}
try:
api_result_str = dumps(resp)[:OBJECT_LOG_LIMIT]
Expand Down

0 comments on commit e02eba2

Please sign in to comment.