From: Marcel van der Veldt Date: Tue, 17 Feb 2026 17:45:29 +0000 (+0100) Subject: Fix: bind sendspin proxy to correct IP X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=08afd823c3180bd231cc8e8a6757f0f451eb08bf;p=music-assistant-server.git Fix: bind sendspin proxy to correct IP --- diff --git a/music_assistant/controllers/webserver/sendspin_proxy.py b/music_assistant/controllers/webserver/sendspin_proxy.py index 2efe07df..5a66482c 100644 --- a/music_assistant/controllers/webserver/sendspin_proxy.py +++ b/music_assistant/controllers/webserver/sendspin_proxy.py @@ -45,7 +45,12 @@ class SendspinProxyHandler: @property def internal_sendspin_url(self) -> str: """Return the internal sendspin URL for connecting to the internal Sendspin server.""" - return f"ws://{self.mass.streams.publish_ip}:8927/sendspin" + # Connect via localhost since the proxy and Sendspin server run in the same process + # If the server binds to 0.0.0.0 (all interfaces), use localhost for efficiency + # Otherwise use the actual bind IP in case it's configured to a specific interface + bind_ip = self.mass.streams.bind_ip + connect_ip = "127.0.0.1" if bind_ip == "0.0.0.0" else bind_ip + return f"ws://{connect_ip}:8927/sendspin" async def handle_sendspin_proxy(self, request: web.Request) -> web.WebSocketResponse: """