Изменения мидлваре
This commit is contained in:
parent
23e1a85e2a
commit
a5785a5577
2 changed files with 1 additions and 1 deletions
|
@ -38,6 +38,7 @@ class AddHeaderMiddleware(BaseHTTPMiddleware):
|
||||||
async def dispatch(self, request: Request, call_next):
|
async def dispatch(self, request: Request, call_next):
|
||||||
response = await call_next(request)
|
response = await call_next(request)
|
||||||
if "Sec-Websocket-Protocol" in request.headers:
|
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"] = request.headers["Sec-Websocket-Protocol"]
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
version: '3.8'
|
|
||||||
services:
|
services:
|
||||||
chat_back:
|
chat_back:
|
||||||
image: chat_back
|
image: chat_back
|
||||||
|
|
Loading…
Add table
Reference in a new issue