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