Spaces:
Configuration error
Configuration error
| # Enable GZIP compression | |
| <IfModule mod_deflate.c> | |
| AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript application/json | |
| </IfModule> | |
| # Browser caching | |
| <IfModule mod_expires.c> | |
| ExpiresActive On | |
| ExpiresByType image/jpg "access plus 1 year" | |
| ExpiresByType image/jpeg "access plus 1 year" | |
| ExpiresByType image/png "access plus 1 year" | |
| ExpiresByType image/webp "access plus 1 year" | |
| ExpiresByType text/css "access plus 1 month" | |
| ExpiresByType application/javascript "access plus 1 month" | |
| ExpiresByType text/javascript "access plus 1 month" | |
| ExpiresByType application/x-javascript "access plus 1 month" | |
| ExpiresByType image/x-icon "access plus 1 year" | |
| ExpiresDefault "access plus 2 days" | |
| </IfModule> | |
| # Security headers | |
| <IfModule mod_headers.c> | |
| Header set X-Content-Type-Options "nosniff" | |
| Header set X-Frame-Options "DENY" | |
| Header set X-XSS-Protection "1; mode=block" | |
| Header set Referrer-Policy "strict-origin-when-cross-origin" | |
| Header set Permissions-Policy "geolocation=(), microphone=(), camera=()" | |
| </IfModule> | |
| # Redirect www to non-www | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
| RewriteRule ^(.*)$ https://%1/ [R=301,L] | |
| </IfModule> |