Skip to content

Remove the string replacement of the bind address/port#14

Merged
gen2brain merged 1 commit intogen2brain:masterfrom
iDigitalFlame:patch-1
Nov 30, 2018
Merged

Remove the string replacement of the bind address/port#14
gen2brain merged 1 commit intogen2brain:masterfrom
iDigitalFlame:patch-1

Conversation

@iDigitalFlame
Copy link
Copy Markdown
Contributor

Removes the bind address in favor of using JS to auto detect the location and use auto detection instead. "window.location.host" will point to the proper endpoint.
If the server is at "10.10.10.10", 'new WebSocket("ws://" + window.location.host + "/socket");' would be created at "ws://10.10.10.10". The "window.location.host" property also includes the port number as well.
This should fix the current open issue with websockets on HTML not rendering properly when the "-bind" option is omitted.

Removes the bind address in favor of using JS to auto detect the location and use instead.  "window.location.host" will point to the proper endpoint.
If the server is at "10.10.10.10", 'new WebSocket("ws://" + window.location.host + "/socket");' would be created at "ws://10.10.10.10". The "window.location.host" property also includes the port number as well.
This should fix the current open issue with websockets on HTML not rendering properly when the "-bind" option is omitted.
@gen2brain gen2brain merged commit 4d73010 into gen2brain:master Nov 30, 2018
@gen2brain
Copy link
Copy Markdown
Owner

Great, thanks!

@iDigitalFlame iDigitalFlame deleted the patch-1 branch December 2, 2018 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants