Skip to content

Instantly share code, notes, and snippets.

@luizfaias
Created March 9, 2017 03:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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