File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -92,15 +92,13 @@ def get_commit_hash_str():
92
92
93
93
def identify_user (request : Request ) -> None :
94
94
# Extract headers
95
- device_id = request .headers .get ("User-Agent" , "unknown-device" )
96
95
reqable_id = request .headers .get ("Reqable-Id" , None )
97
- user_agent = request .headers .get ("User-Agent" , "unknown-group " )
96
+ user_agent = request .headers .get ("User-Agent" , "unknown-UA " )
98
97
99
98
# Assign to Apitally consumer
100
99
request .state .apitally_consumer = ApitallyConsumer (
101
- identifier = device_id if reqable_id is None else reqable_id ,
102
- name = device_id ,
103
- group = user_agent if reqable_id is None else "Reqable" ,
100
+ identifier = "Reqable" if reqable_id else user_agent ,
101
+ group = "Reqable" if reqable_id else "Snap Hutao"
104
102
)
105
103
106
104
You can’t perform that action at this time.
0 commit comments