Created
July 23, 2016 07:17
-
-
Save avicoder/3ebce7fe3f2b52d0b3e5f21cba90cd7e to your computer and use it in GitHub Desktop.
Redirect/enforce website to use secure connection.
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
<script type="text/javascript"> | |
var enforce = "avicoder.me"; | |
if ((enforce == window.location.host) && (window.location.protocol != "https:")) | |
window.location = window.location.toString().replace(/^http:/, "https:"); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment