Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,6 +36,7 @@ AUTHORIZED_API_KEY = os.getenv("HF_API_KEY")
|
|
36 |
def is_authorized(request: gr.Request):
|
37 |
"""Checks if the request includes the correct API key."""
|
38 |
api_key = request.headers.get("API-Key")
|
|
|
39 |
return api_key == AUTHORIZED_API_KEY
|
40 |
|
41 |
SESSION_TIMEOUT = timedelta(hours=1)
|
|
|
36 |
def is_authorized(request: gr.Request):
|
37 |
"""Checks if the request includes the correct API key."""
|
38 |
api_key = request.headers.get("API-Key")
|
39 |
+
print("API-Key received:", api_key) # Log the received API key for debugging
|
40 |
return api_key == AUTHORIZED_API_KEY
|
41 |
|
42 |
SESSION_TIMEOUT = timedelta(hours=1)
|