36 lines
1.4 KiB
ApacheConf
36 lines
1.4 KiB
ApacheConf
|
|
# Page Build System - Apache Configuration
|
||
|
|
|
||
|
|
# Enable compression
|
||
|
|
<IfModule mod_deflate.c>
|
||
|
|
AddOutputFilterByType DEFLATE text/plain
|
||
|
|
AddOutputFilterByType DEFLATE text/html
|
||
|
|
AddOutputFilterByType DEFLATE text/xml
|
||
|
|
AddOutputFilterByType DEFLATE text/css
|
||
|
|
AddOutputFilterByType DEFLATE application/xml
|
||
|
|
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||
|
|
AddOutputFilterByType DEFLATE application/rss+xml
|
||
|
|
AddOutputFilterByType DEFLATE application/javascript
|
||
|
|
AddOutputFilterByType DEFLATE application/x-javascript
|
||
|
|
AddOutputFilterByType DEFLATE image/svg+xml
|
||
|
|
</IfModule>
|
||
|
|
|
||
|
|
# Cache static assets
|
||
|
|
<IfModule mod_expires.c>
|
||
|
|
ExpiresActive on
|
||
|
|
ExpiresByType text/css "access plus 1 year"
|
||
|
|
ExpiresByType application/javascript "access plus 1 year"
|
||
|
|
ExpiresByType image/svg+xml "access plus 1 year"
|
||
|
|
ExpiresByType text/html "access plus 1 hour"
|
||
|
|
</IfModule>
|
||
|
|
|
||
|
|
# Security headers
|
||
|
|
<IfModule mod_headers.c>
|
||
|
|
Header always set X-Content-Type-Options nosniff
|
||
|
|
Header always set X-Frame-Options DENY
|
||
|
|
Header always set X-XSS-Protection "1; mode=block"
|
||
|
|
Header always set Content-Security-Policy "default-src '\''self'\''; style-src '\''self'\'' '\''unsafe-inline'\'' fonts.googleapis.com; font-src fonts.gstatic.com; img-src '\''self'\'' data:; script-src '\''none'\'';"
|
||
|
|
</IfModule>
|
||
|
|
|
||
|
|
# MIME types
|
||
|
|
AddType image/svg+xml .svg
|
||
|
|
AddType text/css .css
|