Revisão Logo, Favicon, Robots
This commit is contained in:
+9
-4
@@ -11,6 +11,9 @@
|
||||
var h = location.hostname;
|
||||
var IS_PROD = h === 'avanzato.com.br' || h === 'www.avanzato.com.br';
|
||||
|
||||
// Torna disponivel para outros scripts
|
||||
window.__IS_PROD__ = IS_PROD;
|
||||
|
||||
// Se NAO for producao, desativa tracking globalmente
|
||||
if (!IS_PROD) {
|
||||
window.__AVANZATO_ENV__ = h === 'hml.avanzato.com.br' ? 'homologation' : 'development';
|
||||
@@ -105,9 +108,9 @@
|
||||
<!-- BLOQUEAR INDEXACAO EM HOMOLOGACAO -->
|
||||
<script>
|
||||
(function() {
|
||||
var hostname = window.location.hostname;
|
||||
if (hostname !== 'avanzato.com.br') {
|
||||
// Homologacao: bloquear indexacao
|
||||
// Usa IS_PROD ja definido no inicio do documento
|
||||
if (!window.__IS_PROD__) {
|
||||
// Homologacao/Desenvolvimento: bloquear indexacao
|
||||
document.getElementById('meta-robots').setAttribute('content', 'noindex, nofollow');
|
||||
document.getElementById('meta-googlebot').setAttribute('content', 'noindex, nofollow');
|
||||
// Adicionar tambem X-Robots-Tag via meta http-equiv
|
||||
@@ -115,7 +118,9 @@
|
||||
meta.httpEquiv = 'X-Robots-Tag';
|
||||
meta.content = 'noindex, nofollow';
|
||||
document.head.appendChild(meta);
|
||||
console.log('%c[SEO] Homologacao detectada - indexacao BLOQUEADA (noindex, nofollow)', 'background:#dc2626;color:#fff;font-weight:bold;padding:2px 6px;border-radius:3px');
|
||||
console.log('%c[SEO] ' + (window.__AVANZATO_ENV__ || 'nao-producao') + ' - indexacao BLOQUEADA', 'background:#dc2626;color:#fff;font-weight:bold;padding:2px 6px;border-radius:3px');
|
||||
} else {
|
||||
console.log('%c[SEO] Producao - indexacao PERMITIDA (index, follow)', 'background:#16a34a;color:#fff;font-weight:bold;padding:2px 6px;border-radius:3px');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user