ddosxd commited on
Commit
f463969
·
1 Parent(s): 26587a6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -57,7 +57,7 @@ def chat_completions():
57
 
58
  streaming = request.json.get('stream', False)
59
 
60
- auth = request.headers.get('User-Agent', 'Bearer anonim')
61
  if auth != f'Bearer {settings["security"]["passw"]}':
62
  if streaming:
63
  er = 'Not authorized'
@@ -106,7 +106,7 @@ def chat_completions():
106
  def v_chat_completions():
107
  streaming = request.json.get('stream', False)
108
 
109
- auth = request.headers.get('User-Agent', 'Bearer anonim')
110
  if auth != f'Bearer {settings["security"]["passw"]}':
111
  return json.dumps({'error':'Not authorized'})
112
 
 
57
 
58
  streaming = request.json.get('stream', False)
59
 
60
+ auth = request.headers.get('Authorization', 'Bearer anonim')
61
  if auth != f'Bearer {settings["security"]["passw"]}':
62
  if streaming:
63
  er = 'Not authorized'
 
106
  def v_chat_completions():
107
  streaming = request.json.get('stream', False)
108
 
109
+ auth = request.headers.get('Authorization', 'Bearer anonim')
110
  if auth != f'Bearer {settings["security"]["passw"]}':
111
  return json.dumps({'error':'Not authorized'})
112