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

Documentation about CSP for websocket #1804

Open
kyeshmz opened this issue Jun 26, 2024 · 4 comments
Open

Documentation about CSP for websocket #1804

kyeshmz opened this issue Jun 26, 2024 · 4 comments
Labels
documentation Improvements or additions to public interface documentation (API reference or readme).

Comments

@kyeshmz
Copy link

kyeshmz commented Jun 26, 2024

Hi,
I am building a electron game that uses Ably Realtime.
I need to add all the CSP headers for security reasons.
It seems that it is hitting variations of wss://realtime.ably.io, such as a.ably.io , b., c., etc.
Is there a list of CSP connect-src that I need to enable somewhere?

Related, but not the same
https://faqs.ably.com/csp-rejection-to-internet-uptxt

┆Issue is synchronized with this Jira Task by Unito

@VeskeR
Copy link
Contributor

VeskeR commented Jun 27, 2024

Hi @kyeshmz !

For websocket connections library will attempt the next hosts by default:
default is wss://realtime.ably.io, and fallback hosts in case of an error: wss://a.ably-realtime.com, wss://b.ably-realtime.com, wss://c.ably-realtime.com, wss://d.ably-realtime.com, wss://e.ably-realtime.com

For HTTP requests library will attempt the next hosts by default:
default is https://rest.ably.io, and fallback hosts in case of an error: https://a.ably-realtime.com, https://b.ably-realtime.com, https://c.ably-realtime.com, https://d.ably-realtime.com, https://e.ably-realtime.com

And you should also add https://internet-up.ably-realtime.com for internet connection checks

@VeskeR VeskeR added the documentation Improvements or additions to public interface documentation (API reference or readme). label Jun 28, 2024
@kyeshmz
Copy link
Author

kyeshmz commented Jul 2, 2024

@VeskeR Hi, Thank you for the prompt reply! I think this is everything that I wanted to know! Hopefully documentation can be added about this somewhere.

@VeskeR
Copy link
Contributor

VeskeR commented Jul 9, 2024

Hey @kyeshmz ! Hope you're doing well!
I forgot one more endpoint that is used by ably-js SDK: wss://ws-up.ably-realtime.com/ - used to check if websocket connectivity is available.

The official documentation for domains to whitelist is available here: https://faqs.ably.com/if-i-need-to-whitelist-ablys-servers-from-a-firewall-which-ports-ips-and/or-domains-should-i-add, with more in depth details too. We will think about adding a link or some mention of this to the ably-js repo README too.

@kyeshmz
Copy link
Author

kyeshmz commented Jul 11, 2024

How do you differ from FAQ and documentation? Just seems like something that could be added in the docs website rather than for FAQ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to public interface documentation (API reference or readme).
Development

No branches or pull requests

2 participants