mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-10-08 09:40:08 +08:00
Remove fingerprint
This commit is contained in:
@@ -110,12 +110,12 @@ class Backend_Api(Api):
|
|||||||
def get_public_key():
|
def get_public_key():
|
||||||
if not has_crypto:
|
if not has_crypto:
|
||||||
return jsonify({"error": {"message": "Crypto support is not available"}}), 501
|
return jsonify({"error": {"message": "Crypto support is not available"}}), 501
|
||||||
try:
|
# try:
|
||||||
diff = time.time() - int(base64.b64decode(request.cookies.get("fingerprint")).decode())
|
# diff = time.time() - int(base64.b64decode(request.cookies.get("fingerprint")).decode())
|
||||||
except Exception as e:
|
# except Exception as e:
|
||||||
return jsonify({"error": {"message": "Invalid fingerprint"}}), 403
|
# return jsonify({"error": {"message": "Invalid fingerprint"}}), 403
|
||||||
if diff > 60 * 60 * 2:
|
# if diff > 60 * 60 * 2:
|
||||||
return jsonify({"error": {"message": "Please refresh the page"}}), 403
|
# return jsonify({"error": {"message": "Please refresh the page"}}), 403
|
||||||
# Send the public key to the client for encryption
|
# Send the public key to the client for encryption
|
||||||
return jsonify({
|
return jsonify({
|
||||||
"public_key": public_key_pem.decode(),
|
"public_key": public_key_pem.decode(),
|
||||||
|
Reference in New Issue
Block a user