geqintan commited on
Commit
2fb5597
·
1 Parent(s): 50be4aa
Files changed (1) hide show
  1. app.py +1 -1
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("API_TOKEN"):
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