Skip to content

Instantly share code, notes, and snippets.

@jakelodwick
Created October 26, 2015 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakelodwick/76214b2831cbab1c2323 to your computer and use it in GitHub Desktop.
Save jakelodwick/76214b2831cbab1c2323 to your computer and use it in GitHub Desktop.
redirect from http to https
if location.protocol is "http:"
window.location = window.location.toString().replace("http:", "https:")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment