Commit aefe7700 authored by nanahira's avatar nanahira

allow token within token server

parent c2c228f9
Pipeline #17242 passed with stages
in 6 minutes and 52 seconds
......@@ -54,7 +54,9 @@ sent_first_message = False
def verify_token(req: Request):
if TOKEN:
valid = "Authorization" in req.headers and req.headers["Authorization"] == "Bearer "+TOKEN
if not valid:
if valid:
return True
if not TOKEN_SERVER and not valid:
raise HTTPException(
status_code=401,
detail="Unauthorized"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment