
# no cache
# <IfModule mod_headers.c>
#   Header set Cache-Control "no-cache, no-store, must-revalidate"
#   Header set Pragma "no-cache"
#   Header set Expires 0
# </IfModule>

# blocco iframe
# "deny" = tutti siti
# "sameorigin" tutti tranne quelli che vengono dalla stessa origine
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
Header set X-Frame-Options "sameorigin"


<IfModule mod_expires.c>
  ExpiresActive On
  AddType application/vnd.ms-fontobject .eot
  AddType application/x-font-ttf .ttf
  AddType application/x-font-opentype .otf
  AddType application/x-font-woff .woff
  AddType application/x-font-woff2 .woff2
  AddType application/font-sfnt otf ttf
  AddType application/font-woff  woff
  AddType application/font-woff2 woff2
  AddType image/svg+xml .svg

  ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
  ExpiresByType application/x-font-ttf "access plus 1 year"
  ExpiresByType application/x-font-opentype "access plus 1 year"
  ExpiresByType application/x-font-woff "access plus 1 year"
  ExpiresByType application/x-font-woff2 "access plus 1 year"
  ExpiresByType application/font-sfnt "access plus 1 year"
  ExpiresByType application/font-woff "access plus 1 year"
  ExpiresByType application/font-woff2 "access plus 1 year"

  ExpiresByType text/html "access plus 1 hour"
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType text/x-javascript "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType application/x-javascript "access plus 1 year"

  ExpiresByType image/svg+xml "access plus 1 year"
  ExpiresByType image/gif "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/pjpeg "access plus 1 year"
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType image/avif "access plus 1 year"

  ExpiresByType application/pdf "access plus 1 year"

  ExpiresByType video/mp4 "access plus 1 year"
  ExpiresByType video/webm "access plus 1 year"
  ExpiresByType video/x-m4v "access plus 1 year"
  ExpiresByType video/quicktime "access plus 1 year"
  ExpiresByType audio/mpeg "access plus 1 year"
  ExpiresByType audio/x-wav "access plus 1 year"

  ExpiresByType image/x-icon "access plus 1 year"
  ExpiresDefault "access plus 1 year"
</IfModule>

<IfModule !mod_expires.c>
  <IfModule mod_headers.c>
    # 1 year
    Header set Cache-Control 'public, max-age 31536000'
  </IfModule>
</IfModule>
