Browsers need to be able to make a request to https://internet-up.ably-realtime.com/is-the-internet-up.txt , and can attempt that both by XHR and JSONP.
The reason for it is that it is part of the logic in the library for determining how to react to connection failures. If a connection attempt fails, it uses that resource to decide if it has general connectivity to the network. If it doesn't then it goes into the wait->reconnect sequence until it succeeds in reconnecting; if however it is genuinely online, but the Ably connection attempt failed, then it will try fallback hosts instead.
So if your page is not allowing that resource to load, the effect will be that it will just assume that it's offline (which will be right most of the time), and just wait until it's back online. Those clients wouldn't use fallbacks if they were unable to connect to the primary endpoint.
If there was a problem whereby they connected but got a 5xx response, then fallbacks would still be used in that case. This is not a big problem, but is something you should do when getting things ready for production.
If there was a problem whereby they connected but got a 5xx response, then fallbacks would still be used in that case. This is not a big problem, but is something you should do when getting things ready for production.
Setup Instructions:
- if you have a connect-src origin list in your CSP header(s), you need to include https://internet-up.ably-realtime.com in the list (this is needed for XHR);
- if you have a script-src origin list in your CSP header(s), you need to include https://internet-up.ably-realtime.com in the list (this is needed for JSONP, for those browsers that don't support cross-origin XHR);
- if you don't have both connect-src and script-src, you need to include the origin in the default-src list.
- if you have a script-src origin list in your CSP header(s), you need to include https://internet-up.ably-realtime.com in the list (this is needed for JSONP, for those browsers that don't support cross-origin XHR);
- if you don't have both connect-src and script-src, you need to include the origin in the default-src list.
As always, if you have any questions regarding the following, please get in touch on support@ably.com and we'll be happy to help you.