mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 02:48:59 +00:00
gui: Actually filter scope ID out of IPv6 address when using Remote GUI (ref #8084) The current code does not work, because it uses a string in the replace() method instead of regex. Thus, change it to a proper regex. Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
This commit is contained in:
parent
563cec8923
commit
1baefea410
@ -1447,7 +1447,7 @@ angular.module('syncthing.core')
|
||||
// Assume hasRemoteGUIAddress is true or we would not be here
|
||||
var conn = $scope.connections[deviceCfg.deviceID];
|
||||
// Use regex to filter out scope ID from IPv6 addresses.
|
||||
return 'http://' + replaceAddressPort(conn.address, deviceCfg.remoteGUIPort).replace('%.*?\]:', ']:');
|
||||
return 'http://' + replaceAddressPort(conn.address, deviceCfg.remoteGUIPort).replace(/%.*?\]:/, ']:');
|
||||
};
|
||||
|
||||
function replaceAddressPort(address, newPort) {
|
||||
|
Loading…
Reference in New Issue
Block a user