2021-10-04 12:20:20 +00:00
|
|
|
# Security tests: https://observatory.mozilla.org/
|
|
|
|
# Disable DNS prefetching: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control
|
2024-06-02 21:48:16 +00:00
|
|
|
Header always set Access-Control-Allow-Origin "analytics.ethanyoo.com"
|
2022-10-31 12:06:46 +00:00
|
|
|
Header always set X-XSS-Protection "1; mode=block"
|
|
|
|
Header always set X-Frame-Options "DENY"
|
|
|
|
Header always set X-DNS-Prefetch-Control "off"
|
|
|
|
Header always set X-Content-Type-Options "nosniff"
|
|
|
|
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" "expr=%{req_novary:X-Forwarded-Proto}=='https'"
|
|
|
|
Header always set Referrer-Policy "no-referrer"
|
|
|
|
Header always set Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autoplay=(), battery=(), camera=(), cross-origin-isolated=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), geolocation=(), gyroscope=(), keyboard-map=(), magnetometer=(), microphone=(), midi=(), navigation-override=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), web-share=(), xr-spatial-tracking=()"
|
2024-06-25 23:37:31 +00:00
|
|
|
Header always set Content-Security-Policy "default-src 'none'; img-src 'self'; style-src 'self' 'sha256-LjAT7bhFv1zP58aCXKasCTIJMEOvFjjXkmhr/ekDANM='; base-uri 'self'; connect-src https://analytics.ethanyoo.com/ 'self'; form-action https://duckduckgo.com; frame-ancestors 'none'; script-src-elem https://analytics.ethanyoo.com/ 'self' 'sha256-RzxOh5mdjWlyRcbdPibUQG7O7WXZSthwslaZe52R7jE='; worker-src 'self'; upgrade-insecure-requests;"
|
2021-10-04 12:20:20 +00:00
|
|
|
|
|
|
|
# Set custom error page: https://faq.nearlyfreespeech.net/full/error
|
|
|
|
ErrorDocument 404 /404.html
|
|
|
|
|
|
|
|
# Set directives for caching of static resources
|
|
|
|
<FilesMatch "\.(css|ico|jpg|jpeg|png|svg)$">
|
|
|
|
Header set Cache-Control "max-age=2592000, public, immutable"
|
|
|
|
</FilesMatch>
|