This document describes the security measures implemented for kenneth.dsouza.im and their current status.
- Status: Active (via meta tag)
- Implementation:
astro-site/src/layouts/BaseLayout.astro - Configuration: Restricts resource loading to trusted sources
- Allows same-origin content
- Permits Google Fonts and CDN fonts
- Enables HTTPS images
- Allows inline scripts (required for Astro)
- Status: Active (via meta tag)
- Implementation:
astro-site/src/layouts/BaseLayout.astro - Configuration:
strict-origin-when-cross-origin - Benefit: Protects user privacy while maintaining functional navigation
- Status: Partial (crossorigin attributes added)
- Implementation:
astro-site/src/layouts/BaseLayout.astro - Limitation: Full SRI cannot be implemented for Google Fonts due to dynamic content
- Current setup: All external resources have
crossorigin="anonymous"for proper CORS handling
- Status: Not active on GitHub Pages
- File prepared:
astro-site/public/_headers - Limitation: GitHub Pages does not support custom HTTP headers
- Solution: Migrate to Cloudflare Pages or Netlify, or configure Cloudflare CDN
- Status: Not active on GitHub Pages
- File prepared:
astro-site/public/_headers - Limitation: Cannot be set via meta tags
- Solution: Same as HSTS above
- Status: Not implemented (by user request)
- Note: The frame-ancestors CSP directive was intentionally excluded
- Sign up for Cloudflare (free)
- Point your domain's nameservers to Cloudflare
- Cloudflare will automatically respect the
_headersfile - Alternatively, configure headers in Cloudflare dashboard under Rules → Transform Rules
- Import the GitHub repository to Cloudflare Pages
- The
_headersfile will work automatically - All security headers will be active immediately
- Import the GitHub repository to Netlify
- The
_headersfile will work automatically - All security headers will be active immediately
After implementing the CDN solution, test your security headers at:
Based on Mozilla Observatory testing:
- Active: CSP (-25 → 0), Referrer Policy (info)
- Pending: HSTS (-20), X-Content-Type-Options (-5)
- Expected improvement: +45 points once HSTS and X-Content-Type-Options are active