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

XFEstudio/gpt4free

Remove fingerprint

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

代码差异

1 个文件 +6 -6
Modified g4f/gui/server/backend_api.py +6 -6
@@ -110,12 +110,12 @@ class Backend_Api(Api):
110 110 def get_public_key():
111 111 if not has_crypto:
112 112 return jsonify({"error": {"message": "Crypto support is not available"}}), 501
113 try:
114 diff = time.time() - int(base64.b64decode(request.cookies.get("fingerprint")).decode())
115 except Exception as e:
116 return jsonify({"error": {"message": "Invalid fingerprint"}}), 403
117 if diff > 60 * 60 * 2:
118 return jsonify({"error": {"message": "Please refresh the page"}}), 403
113 # try:
114 # diff = time.time() - int(base64.b64decode(request.cookies.get("fingerprint")).decode())
115 # except Exception as e:
116 # return jsonify({"error": {"message": "Invalid fingerprint"}}), 403
117 # if diff > 60 * 60 * 2:
118 # return jsonify({"error": {"message": "Please refresh the page"}}), 403
119 119 # Send the public key to the client for encryption
120 120 return jsonify({
121 121 "public_key": public_key_pem.decode(),