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.
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.