ScatterDesktop icon indicating copy to clipboard operation
ScatterDesktop copied to clipboard

Problem with logic to store socket with request origin as key value when localhost

Open gtolarc opened this issue 5 years ago • 0 comments

When I connect to the scatter from localhost, I get an error that the socket cannot be found.

https://github.com/GetScatter/ScatterDesktop/blob/master/electron/services/sockets.js#L76 https://github.com/GetScatter/ScatterDesktop/blob/master/electron/services/sockets.js#L32

The above code part is related. It seems to determine origin as the appName of the client side, not the hostname, only when the client side has the localhost address. Since appName usually contains a space character in the middle, it usually only has a problem when using localhost in the development environment like me, and usually there will be no problem.

However, it is too inconvenient when developing. I think it would be nice to not trim it. I actually removed the trim and confirmed that it works.

gtolarc avatar May 11 '20 05:05 gtolarc