Skip to content

Instantly share code, notes, and snippets.

@luizfaias
Created March 9, 2017 03:34
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 luizfaias/f01382874f6eb8889a1e12a867d82ac2 to your computer and use it in GitHub Desktop.
Save luizfaias/f01382874f6eb8889a1e12a867d82ac2 to your computer and use it in GitHub Desktop.
Loja Integrada - forçar SSL (https)
<!--
1. Crie um novo código HTML (https://app.lojaintegrada.com.br/painel/configuracao/html/criar)
2. Descrição: Forçar SSL
3. Local de publicação: Rodapé
4. Página: Todas as páginas
5. Tipo: Javascript
6. Conteúdo: cole todo o código abaixo
7. Divirta-se
-->
if (location.protocol != 'https:') {
location.href = 'https:' + window.location.href.substring(window.location.protocol.length);
}
$('a').each(function() {
$(this).attr('href', this.href.replace('http:','https:'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment