gosign commited on
Commit
13fad22
·
verified ·
1 Parent(s): 6be94e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -96,10 +96,11 @@ def generate_image():
96
  # token = request.headers.get('Authorization')
97
 
98
  token = "Bearer JDJiJDEyJDgwbUJwQTFrQ0JYdS9lR2R4ZEZWdmV3WS9VTmlCeHNtc2txbnBITjR4Qm96ZmFnVUkvNDlh"
 
99
  if token is None:
100
  return jsonify({'error': 'No token provided'}), 400
101
  if token.startswith("Bearer "):
102
- token = token.split(" ")[1] # Extract the actual token if 'Bearer ' exists
103
 
104
  # Base64 decode the encoded token
105
  token = base64.b64decode(token).decode("utf-8")
 
96
  # token = request.headers.get('Authorization')
97
 
98
  token = "Bearer JDJiJDEyJDgwbUJwQTFrQ0JYdS9lR2R4ZEZWdmV3WS9VTmlCeHNtc2txbnBITjR4Qm96ZmFnVUkvNDlh"
99
+
100
  if token is None:
101
  return jsonify({'error': 'No token provided'}), 400
102
  if token.startswith("Bearer "):
103
+ token = token.split(" ")[1]
104
 
105
  # Base64 decode the encoded token
106
  token = base64.b64decode(token).decode("utf-8")