Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Not Working as Expected with Verisign Certificate. #26

Closed
sedhuait opened this issue Nov 12, 2013 · 1 comment
Closed

Not Working as Expected with Verisign Certificate. #26

sedhuait opened this issue Nov 12, 2013 · 1 comment

Comments

@sedhuait
Copy link

I tried to integrate offline js with my existing https webapp. My Verisign certification is getting removed since offline js making calls to "http://dqakt69vkj09v.cloudfront.net/are-we-online.gif....".

@zackbloom
Copy link
Contributor

I didn't know they looked at every endpoint, interesting. From the docs:

Offline ships with two methods for checking the connection. One makes a request for a tiny image hosted on a
cloudfront account for the benevolence of all, the other makes an XHR request against the current domain,
hoping to get back any sort of response (even a 404).

You can change the url of the image to be one you control, if you like:

Offline.options = {checks: {image: {url: 'my-image.gif'}}};

Loading an image was chosen (rather than a script file), because it limits the potential damage if a
hostile party were to be in control of it.

You can also switch to the XHR method:

Offline.options = {checks: {active: 'xhr'}}

The XHR method is not enabled by default because of a concern that some sites do a significant amount of
processing to build their 404 page, so it's not something we want to send unnecessarily. It's also
possible that the page would respond with a redirect to a different domain, creating a CORS problem.
If you have control of the domain and can create an endpoint which just responds with a quick 204,
that's the perfect solution. You can set the endpoint in settings as well:

Offline.options = {checks: {xhr: {url: '/health-check'}}};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants