Skip to content

Commit

Permalink
zeroconf: use route prefix for zeroconf/ssdp servers
Browse files Browse the repository at this point in the history
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
  • Loading branch information
Arksine committed Sep 22, 2023
1 parent d98f11b commit ee62d07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions moonraker/components/zeroconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ async def component_init(self) -> None:
zc_service_props = {
"uuid": instance_uuid,
"https_port": hi["ssl_port"] if app.https_enabled() else "",
"version": app_args["software_version"]
"version": app_args["software_version"],
"route_prefix": app.route_prefix
}
if self.bound_all:
if not host:
Expand Down Expand Up @@ -272,7 +273,8 @@ def register_service(
if len(name) > 64:
name = name[:64]
self.name = name
self.base_url = f"http://{host_name_or_ip}:{port}"
app: MoonrakerApp = self.server.lookup_component("application")
self.base_url = f"http://{host_name_or_ip}:{port}{app.route_prefix}"
self.response_headers = [
f"USN: uuid:{self.unique_id}::upnp:rootdevice",
f"LOCATION: {self.base_url}/server/zeroconf/ssdp",
Expand Down

0 comments on commit ee62d07

Please sign in to comment.