Skip to content

Instantly share code, notes, and snippets.

@gabrielcorado
Created January 6, 2016 17:43
Show Gist options
  • Save gabrielcorado/f1bcdebafa7aa1d149b5 to your computer and use it in GitHub Desktop.
Save gabrielcorado/f1bcdebafa7aa1d149b5 to your computer and use it in GitHub Desktop.
Force SSL JavaScript front-end
// Replace the current protocol (http) to https
window.location.href = window.location.href.replace('http', 'https');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment