mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-19 21:22:50 +03:00
strip the query before matching go2rtc paths in the origin check
This commit is contained in:
+2
-3
@@ -1300,9 +1300,8 @@ def _is_cross_origin_stream_request(original_url: str | None, request: Request)
|
|||||||
# the internal port grants admin, so a browser on another site must be
|
# the internal port grants admin, so a browser on another site must be
|
||||||
# stopped before that early return
|
# stopped before that early return
|
||||||
upgrade = request.headers.get("x-original-upgrade", "").lower()
|
upgrade = request.headers.get("x-original-upgrade", "").lower()
|
||||||
if upgrade != "websocket" and not _is_go2rtc_stream_proxy_request(
|
path = split_request_uri(original_url or "")[0]
|
||||||
original_url or "", request
|
if upgrade != "websocket" and not _is_go2rtc_stream_proxy_request(path, request):
|
||||||
):
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return not origin_allowed(
|
return not origin_allowed(
|
||||||
|
|||||||
Reference in New Issue
Block a user