mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-08 17:56:33 +00:00
Fix: Websocket detection case sensitive (#1040)
This commit is contained in:
parent
0da924f10b
commit
3ed7cbe2ed
@ -209,8 +209,8 @@ def _is_websocket(request: web.Request) -> bool:
|
|||||||
headers = request.headers
|
headers = request.headers
|
||||||
|
|
||||||
if (
|
if (
|
||||||
headers.get(hdrs.CONNECTION) == "Upgrade"
|
headers.get(hdrs.CONNECTION, "").lower() == "upgrade"
|
||||||
and headers.get(hdrs.UPGRADE) == "websocket"
|
and headers.get(hdrs.UPGRADE, "").lower() == "websocket"
|
||||||
):
|
):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user