Created
November 29, 2016 15:15
-
-
Save sam0x17/fbb0c1c2d6dfe929dc74cf4617647f0e to your computer and use it in GitHub Desktop.
force ssl on rails google app engine
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
index = window.location.href.indexOf('localhost') | |
index2 = window.location.href.indexOf('127.0.0.1') | |
if window.location.protocol != 'https:' && !(index > -1 || index2 > -1) | |
window.location.href = 'https:' + window.location.href.substring(window.location.protocol.length) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment