Skip to content

Instantly share code, notes, and snippets.

@jakelodwick
Created October 26, 2015 20:32
Show Gist options
  • 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