mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-10-05 08:16:58 +08:00
Add user information to encryption response in handle_synthesize method
This commit is contained in:
@@ -122,7 +122,8 @@ class Backend_Api(Api):
|
||||
# Send the public key to the client for encryption
|
||||
return jsonify({
|
||||
"public_key": public_key_pem.decode(),
|
||||
"data": encrypt_data(sub_public_key, str(int(time.time())))
|
||||
"data": encrypt_data(sub_public_key, str(int(time.time()))),
|
||||
"user": request.headers.get("x-user", "error")
|
||||
})
|
||||
|
||||
@app.route('/backend-api/v2/models', methods=['GET'])
|
||||
|
Reference in New Issue
Block a user