Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to localhost not working #27

Open
oxarbitrage opened this issue Aug 27, 2019 · 2 comments
Open

Fallback to localhost not working #27

oxarbitrage opened this issue Aug 27, 2019 · 2 comments

Comments

@oxarbitrage
Copy link
Member

By trying the samples i get this error:

Firefox can’t establish a connection to the server at wss://local.get-beet.io:60556/.

By watching the code the fallback flag is false:
https://github.com/bitshares/beet-js/blob/master/src/lib/socket.js#L3

By beet README:

While logged-in, Beet exposes a websocket API LOCALLY that can only be accessed by applications running on your computer ...

I think the default should be localhost, i am not sure why the fallback is there and why beet will expose to that url.

At least some docs for clarification about this should be needed, hosts should be maybe in a config file among other variables if we really need them(for me it should just need to try to connect to ws://localhost:60555)

@grctest
Copy link
Contributor

grctest commented Nov 15, 2021

I ran into this issue, it would fail the first attempt to get-beet, then the second attempt would attempt the localhost connection.

To work around this, you could do what I did - delete the get-beet url from the dist file, leaving only the localhost url behind.

@sschiessl-bcp
Copy link
Collaborator

It's a safety feature to disallow localhost fallsback because then you are using a ws instead of a wss connection. In your script
you simply do beet.allowLocalhostFallback(); when you want the fallback to trigger.

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

No branches or pull requests

3 participants