Skip to content

Instantly share code, notes, and snippets.

@jonasjohansson
Created September 8, 2020 05:39
Show Gist options
  • Save jonasjohansson/1e580e1635c02683a980ee48a2b43169 to your computer and use it in GitHub Desktop.
Save jonasjohansson/1e580e1635c02683a980ee48a2b43169 to your computer and use it in GitHub Desktop.
Glitch HTTPS redirect
if (location.protocol != 'https:') {
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