1
Someone can help me because I can only add one domain, and when I try to put more than 1 URL it doesn’t work. If anyone can help me I’m grateful!
if((window.location.href).indexOf('DOMÍNIO') >= 0){
}else{ // Como faço para adicionar mais de um DOMÍNIO ?
}
Edit:
I did so and the alert worked only in Domain 1, when I open the second site appears the alert, can you help me because Domain 2 is not being recognized? Below is the model:
var listaDominios = ["http://www.dominio1.com", "http://www.dominio2.com"];
var dominioValido = listaDominios.find(function(dominio){
return window.location.href.indexOf(dominio) > -1;
});
if(dominioValido) {
}else{
alert('Site não autorizado');
}
You have to review the question Edit?
– Igor Ramos