This document explains the security measures implemented for the Vasdekis website when deployed on GitHub Pages.
GitHub Pages has limitations when it comes to setting custom HTTP security headers. Unlike Cloudflare Pages or Netlify, GitHub Pages doesn’t support _headers files or custom server configurations.
The following security headers are implemented via HTML meta tags in index.html:
X-Content-Type-Options: nosniff - Prevents MIME type sniffingReferrer-Policy: strict-origin-when-cross-origin - Controls referrer informationX-XSS-Protection: 1; mode=block - Enables XSS filteringPermissions-Policy - Restricts access to browser featuresA service worker is registered to:
Jekyll configuration includes:
The .github/workflows/pages.yml workflow:
The following security headers from _headers cannot be effectively implemented on GitHub Pages:
X-Frame-Options (requires HTTP header)Strict-Transport-Security (requires HTTP header)Content-Security-Policy with frame-ancestors (limited via meta tags)Cross-Origin-* policies (require HTTP headers)For full security header support, consider:
_headers file_headers fileTo verify the implemented headers:
Note: Some security policies are enforced client-side and may not appear in HTTP headers but are still effective.