Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -19,7 +19,7 @@ async def verify_internal_token(request: Request):
|
|
19 |
path = request.url.path
|
20 |
if timestamp > int(timestampStr):
|
21 |
raise HTTPException(status_code=403, detail="Forbidden")
|
22 |
-
md5hash = hashlib.md5(f"{path}-{timestampStr}-{rand}-{uid}-{os.
|
23 |
md5 = md5hash.hexdigest()
|
24 |
if md5 != hashStr:
|
25 |
raise HTTPException(status_code=403, detail="Forbidden")
|
|
|
19 |
path = request.url.path
|
20 |
if timestamp > int(timestampStr):
|
21 |
raise HTTPException(status_code=403, detail="Forbidden")
|
22 |
+
md5hash = hashlib.md5(f"{path}-{timestampStr}-{rand}-{uid}-{os.environ.get('AUTH_KEY')}".encode())
|
23 |
md5 = md5hash.hexdigest()
|
24 |
if md5 != hashStr:
|
25 |
raise HTTPException(status_code=403, detail="Forbidden")
|