Last active
October 14, 2016 05:14
-
-
Save NamPNQ/e85d764309c3c6fe5abe254c8cd94fb6 to your computer and use it in GitHub Desktop.
Check ssl cert trusted
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
//Source: http://stackoverflow.com/a/25077676/1798281 | |
<script> var sslCertTrusted = false; </script> | |
<script src="https://example.com/ssltest.js"></script> | |
<script> | |
if (!sslCertTrusted) | |
{ | |
alert('Sorry, you need to install the certificate first.'); | |
window.location('http://example.com/cert_install_instructions/'); | |
} | |
else | |
{ | |
// alert('Redirecting to secure connection') | |
window.location('https://example.com/'); | |
} | |
<script> |
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
sslCertTrusted = true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment