add video streaming endpoints

adjust config for bypassing nginx
add communication to ergo
add cachebusting + fixing icons
This commit is contained in:
CEF Server 2024-07-13 00:31:43 +00:00
parent 15e1018476
commit 6a69c5a34d
6 changed files with 160 additions and 10 deletions

View file

@ -5,6 +5,7 @@ from fastapi.security import HTTPBearer
import config
from fastapi import Request, HTTPException
JWT_PUBKEY = open(config.SECRETKEY).read()
JWT_ALGORITHM = "RS256"
@ -13,7 +14,7 @@ def decodeJWT(token: str) -> dict:
try:
decoded_token = jwt.decode(token, JWT_PUBKEY, algorithms=[JWT_ALGORITHM])
return decoded_token if decoded_token["exp"] >= time.time() else None
except:
except Exception as e:
return {}