-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnetlify.toml
More file actions
68 lines (57 loc) · 1.77 KB
/
Copy pathnetlify.toml
File metadata and controls
68 lines (57 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# netlify.toml
[build]
publish = "dist"
command = "npm run build"
functions = "netlify/functions"
# Auditoría MÓVIL (Google mobile-first)
[[plugins]]
package = "@netlify/plugin-lighthouse"
[plugins.inputs]
# URL a auditar (reemplaza "urls")
audit_url = "/"
# Directorio donde guardar reportes
output_path = "reports/lighthouse"
# Auditorías específicas a ejecutar
audits = ["performance", "accessibility", "best-practices", "seo"]
# Umbrales de puntuación (mantiene la misma estructura)
[plugins.inputs.thresholds]
performance = 80
accessibility = 90
best-practices = 85
seo = 90
# Headers para assets de Astro (directorio estándar) - caché de 24 horas
[[headers]]
for = "/_astro/*"
[headers.values]
Cache-Control = "public, max-age=86400"
# Headers para archivos JavaScript con caché de 24 horas
[[headers]]
for = "*.js"
[headers.values]
Content-Type = "text/javascript; charset=utf-8"
Cache-Control = "public, max-age=86400"
# Headers para archivos CSS con caché de 24 horas
[[headers]]
for = "*.css"
[headers.values]
Content-Type = "text/css; charset=utf-8"
Cache-Control = "public, max-age=86400"
# Sin caché para HTML (garantiza contenido actualizado)
[[headers]]
for = "*.html"
[headers.values]
Cache-Control = "public, max-age=0, must-revalidate"
# Headers de seguridad mejorados
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "geolocation=(), microphone=(), camera=()"
# Configuración de redirects - SPA routing
[[redirects]]
from = "/*"
to = "/index.html"
status = 200