Изменения мидлваре
This commit is contained in:
parent
018d6bc0c2
commit
fee11eda05
1 changed files with 1 additions and 0 deletions
|
@ -48,6 +48,7 @@ class AddHeaderMiddleware(BaseHTTPMiddleware):
|
||||||
async def dispatch(self, request: Request, call_next):
|
async def dispatch(self, request: Request, call_next):
|
||||||
logging.critical(f"Запрос \n{request.headers.get("Sec-Websocket-Protocol", "НИХУЯ")}")
|
logging.critical(f"Запрос \n{request.headers.get("Sec-Websocket-Protocol", "НИХУЯ")}")
|
||||||
logging.critical(f"Запрос {request.headers}")
|
logging.critical(f"Запрос {request.headers}")
|
||||||
|
logging.critical("Sec-Websocket-Protocol".lower() in request.headers)
|
||||||
response = await call_next(request)
|
response = await call_next(request)
|
||||||
logging.critical(f"Ответ \n {response.headers.get("Sec-Websocket-Protocol", "НИХУЯ")}")
|
logging.critical(f"Ответ \n {response.headers.get("Sec-Websocket-Protocol", "НИХУЯ")}")
|
||||||
if "Sec-Websocket-Protocol" in request.headers:
|
if "Sec-Websocket-Protocol" in request.headers:
|
||||||
|
|
Loading…
Add table
Reference in a new issue