Изменения мидлваре
This commit is contained in:
parent
fee11eda05
commit
2f01b77626
1 changed files with 1 additions and 3 deletions
|
@ -51,9 +51,7 @@ class AddHeaderMiddleware(BaseHTTPMiddleware):
|
|||
logging.critical("Sec-Websocket-Protocol".lower() in request.headers)
|
||||
response = await call_next(request)
|
||||
logging.critical(f"Ответ \n {response.headers.get("Sec-Websocket-Protocol", "НИХУЯ")}")
|
||||
if "Sec-Websocket-Protocol" in request.headers:
|
||||
raise ValueError(request.headers["Sec-Websocket-Protocol"])
|
||||
response.headers["Sec-Websocket-Protocol"] = request.headers["Sec-Websocket-Protocol"]
|
||||
response.headers["Sec-Websocket-Protocol"] = ""
|
||||
return response
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue