cors-connect
This commit is contained in:
@@ -3,11 +3,12 @@ from httpx import AsyncClient, HTTPError
|
||||
from settings import AUTH_URL
|
||||
|
||||
|
||||
INTERNAL_AUTH_SERVER = "v2.discours" in AUTH_URL
|
||||
INTERNAL_AUTH_SERVER = "v2.discours" in AUTH_URL or "testapi.discours" in AUTH_URL
|
||||
|
||||
|
||||
async def check_auth(req):
|
||||
token = req.headers.get("Authorization")
|
||||
print(f"[services.auth] checking auth token: {token}")
|
||||
gql = (
|
||||
{"mutation": "{ getSession { user { id } } }"}
|
||||
if INTERNAL_AUTH_SERVER
|
||||
|
Reference in New Issue
Block a user