update
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ async def verify_auth(authorization: str = Header(..., alias="Authorization")):
|
|
| 14 |
if not authorization.startswith("Bearer "):
|
| 15 |
raise HTTPException(status_code=401, detail="Invalid token format. Use 'Bearer YOUR_TOKEN'")
|
| 16 |
token = authorization[len("Bearer "):]
|
| 17 |
-
if token != os.getenv("
|
| 18 |
raise HTTPException(status_code=401, detail="Invalid token")
|
| 19 |
return token
|
| 20 |
|
|
|
|
| 14 |
if not authorization.startswith("Bearer "):
|
| 15 |
raise HTTPException(status_code=401, detail="Invalid token format. Use 'Bearer YOUR_TOKEN'")
|
| 16 |
token = authorization[len("Bearer "):]
|
| 17 |
+
if token != os.getenv("AUTHORIZATION"):
|
| 18 |
raise HTTPException(status_code=401, detail="Invalid token")
|
| 19 |
return token
|
| 20 |
|