freenet-core
freenet-core copied to clipboard
River WebSocket hardcoded to port 50509 instead of using serving port
Summary
The River app WebSocket connection is hardcoded to connect to port 50509, but it should dynamically connect to whatever port the HTTP page was served from.
Current Behavior
- River app served on any port (e.g., 55509)
- WebSocket tries to connect to hardcoded port 50509
- Connection fails if Freenet is not running on port 50509
Expected Behavior
- WebSocket should connect to the same port that served the HTTP page
- Use
window.location.portor similar to dynamically determine the correct port
Test Case
- Start Freenet on non-default port:
freenet network --port 55509 - Navigate to River app:
http://127.0.0.1:55509/v1/contract/web/BcfxyjCH4snaknrBoCiqhYc9UFvmiJvhsp5d4L5DuvRa/ - Observe WebSocket connection error trying to connect to port 50509
🤖 Generated with Claude Code