-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
39 lines (34 loc) · 2.1 KB
/
Copy path.htaccess
File metadata and controls
39 lines (34 loc) · 2.1 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
# ── Swift Livery Catalog — caché y cabeceras de seguridad ─────────────────────
# Requiere Apache/LiteSpeed con mod_headers y mod_expires (Hostinger los trae).
# ── Caché de estáticos ────────────────────────────────────────────────────────
<IfModule mod_expires.c>
ExpiresActive On
# Estáticos versionables: 1 año, inmutables.
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
# HTML y textos que cambian: sin caché persistente.
ExpiresByType text/html "access plus 0 seconds"
ExpiresByType text/plain "access plus 0 seconds"
ExpiresByType application/xml "access plus 1 day"
</IfModule>
<IfModule mod_headers.c>
# Marca immutable en los estáticos de larga vida.
<FilesMatch "\.(woff2|webp|png|svg|css|js)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
<FilesMatch "\.(html|md)$">
Header set Cache-Control "no-cache"
</FilesMatch>
# ── Cabeceras de seguridad ──────────────────────────────────────────────────
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set X-Frame-Options "DENY"
Header always set Cross-Origin-Opener-Policy "same-origin"
Header always set Strict-Transport-Security "max-age=31536000"
Header always set Content-Security-Policy "default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self'; font-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'"
</IfModule>