analysis: fix dump url detection

Don't use the detected public IP when the user
has configured Moonraker to listen exclusively
on the localhost.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan committed 2025-04-22 05:46:53 -04:00
1 parent 5ee0adc553
commit 1c12414972
1 file changed
+1 -1
+1 -1
View File
@@ -350,7 +350,7 @@ class GcodeAnalysis:
machine: Machine = self.server.lookup_component("machine")
host_info = self.server.get_host_info()
host_addr: str = host_info["address"]
if host_addr.lower() in ["all", "0.0.0.0"]:
if host_addr.lower() in ("all", "0.0.0.0", "localhost", "127.0.0.1"):
address = "127.0.0.1"
elif host_addr.lower() == "::":
address = "::1"