Skip to content

Commit

Permalink
refactor hostname for rtsp
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlt8 committed Oct 2, 2024
1 parent ae31d52 commit 44c1fc6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/wyzebridge/onvif.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
import uuid
from datetime import UTC, datetime
from threading import Thread
from urllib.parse import urlparse
from xml.etree import ElementTree

from flask import request
from wyzebridge import config
from wyzebridge.auth import WbAuth
from wyzebridge.bridge_utils import env_bool
from wyzebridge.logging import logger

NAMESPACES = {
Expand Down Expand Up @@ -409,7 +407,7 @@ def get_profiles(streams):


def get_stream_uri(profile):
hostname = env_bool("DOMAIN", urlparse(request.root_url).hostname or "localhost")
hostname = request.host.split(":")[0]
if WbAuth.enabled:
hostname = f"wb:{WbAuth.api}@{hostname}"
return f"""<trt:GetStreamUriResponse>
Expand Down

0 comments on commit 44c1fc6

Please sign in to comment.