XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Add user information to encryption response in handle_synthesize method

be52b6af
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -1
Modified g4f/gui/server/backend_api.py +2 -1
@@ -122,7 +122,8 @@ class Backend_Api(Api):
122 122 # Send the public key to the client for encryption
123 123 return jsonify({
124 124 "public_key": public_key_pem.decode(),
125 "data": encrypt_data(sub_public_key, str(int(time.time())))
125 "data": encrypt_data(sub_public_key, str(int(time.time()))),
126 "user": request.headers.get("x-user", "error")
126 127 })
127 128
128 129 @app.route('/backend-api/v2/models', methods=['GET'])