Skip to content

Instantly share code, notes, and snippets.

@carlosleonam
Last active September 30, 2021 17:28
Show Gist options
  • Save carlosleonam/22215a45c480ce4ec2fadd8d158f703f to your computer and use it in GitHub Desktop.
Save carlosleonam/22215a45c480ce4ec2fadd8d158f703f to your computer and use it in GitHub Desktop.
Ativar a URL 'limpa' em sistemas no Adianti Framework.

Ativar a URL 'limpa' em sistemas no Adianti Framework.

Precisamos ir acrescentando camadas de segurança, para aplicativos hospedados na WEB.

// Check is LOCAL
if (window.location.host.replace(/(localhost|127\.0\.0\.1)(:\d+)?/i, "") !== '') {

    Adianti.registerState = false;  // Disable URL parameters

}

No caso de necessitar liberar a exibição também na rede local/intranet, basta:

// Check is LOCAL
if (window.location.host.replace(/(localhost|127\.0\.0\.1|192\.168\.\d\.\d+)(:\d+)?/i, "") !== '') {

    Adianti.registerState = false;  // Disable URL parameters

}

leia também:

5 dicas de segurança ao desenvolver com Adianti Framework e PHP

( https://www.adianti.com.br/forum/pt/view_2065 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment