mirror of
https://github.com/gen2brain/cam2ip.git
synced 2026-04-26 22:55:53 +03:00
[PR #14] [MERGED] Remove the string replacement of the bind address/port #51
Labels
No labels
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cam2ip#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/gen2brain/cam2ip/pull/14
Author: @iDigitalFlame
Created: 11/30/2018
Status: ✅ Merged
Merged: 11/30/2018
Merged by: @gen2brain
Base:
master← Head:patch-1📝 Commits (1)
13385baRemove the string replacement of the bind address/port📊 Changes
1 file changed (+3 additions, -10 deletions)
View changed files
📝
handlers/html.go(+3 -10)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.