mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-10-18 06:10:44 +08:00
Update backend_api.py
This commit is contained in:
@@ -110,9 +110,9 @@ 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
|
||||||
if time.time() - int(base64.b64decode(request.cookies.get("fingerprint", "MA==")).decode()) > 60:
|
# if time.time() - int(base64.b64decode(request.cookies.get("fingerprint", "MA==")).decode()) > 60:
|
||||||
# If the fingerprint is older than 60 seconds, generate a new one
|
# If the fingerprint is older than 60 seconds, generate a new one
|
||||||
resp = jsonify({"error": {"message": "Please refresh the page"}})
|
# resp = jsonify({"error": {"message": "Please refresh the page"}})
|
||||||
return resp
|
return resp
|
||||||
# Send the public key to the client for encryption
|
# Send the public key to the client for encryption
|
||||||
return jsonify({
|
return jsonify({
|
||||||
|
Reference in New Issue
Block a user