-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a hack to detect distrust of Let's Encrypt
Many older devices do not support the Let's Encrypt CA, for various reasons. This causes connection issues for sites using Let's Encrypt to support HTTPS connections. This commit adds a hack that can be enabled with a switch in callbacks.js to try to detect when the user's browser does not trust the certificate and permit the user to connect to an insecure endpoint instead. Unfortunately, the AJAX API does not allow to distinguish between *why* a request fails, so the best we can do is detect that the HTTPS request failed, try to make a request over plain HTTP, and if it works, assume the HTTPS request failed due to a certificate error. It's not 100% foolproof since the HTTPS endpoint could just be down for some reason, but it should work well enough in most cases. Closes #602
- Loading branch information
1 parent
aaa21aa
commit 6e416fe
Showing
1 changed file
with
71 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters