Spaces:
Sleeping
Sleeping
Gouzi Mohaled
commited on
Commit
·
3d900a3
1
Parent(s):
1ca3568
J'ai modifié USER_API_KEY par os.environ.get
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ Tu es un développeur logiciel expérimenté. Tu dois toujours répondre en fran
|
|
22 |
"""
|
23 |
|
24 |
# Clé API pour l'authentification
|
25 |
-
USER_API_KEY = "
|
26 |
|
27 |
async def verify_api_key(x_api_key: str = Header(...)):
|
28 |
if x_api_key != USER_API_KEY:
|
|
|
22 |
"""
|
23 |
|
24 |
# Clé API pour l'authentification
|
25 |
+
USER_API_KEY = os.environ.get("USER_API_KEY") # Récupère la valeur de la variable d'environnement
|
26 |
|
27 |
async def verify_api_key(x_api_key: str = Header(...)):
|
28 |
if x_api_key != USER_API_KEY:
|