Spaces:
Running
Running
File size: 1,362 Bytes
187727d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # Security Headers for Cloudflare Pages
# These headers apply to all routes unless overridden
/*
# Content Security Policy - Prevents XSS attacks
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.paddle.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; connect-src 'self' https://*.supabase.co https://*.hf.space https://api.paddle.com https://sandbox-api.paddle.com; font-src 'self' data:; frame-ancestors 'none'; base-uri 'self'; form-action 'self' https://checkout.paddle.com https://sandbox-checkout.paddle.com
# Prevent clickjacking
X-Frame-Options: DENY
# Prevent MIME type sniffing
X-Content-Type-Options: nosniff
# Referrer policy - Balance privacy and functionality
Referrer-Policy: strict-origin-when-cross-origin
# Permissions policy - Disable unused browser features
Permissions-Policy: camera=(), microphone=(), geolocation=(), interest-cohort=()
# Strict Transport Security - Force HTTPS (31536000 = 1 year)
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
# XSS Protection (legacy, but still useful for older browsers)
X-XSS-Protection: 1; mode=block
# API routes may need different CSP for JSON responses
/api/*
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
X-Content-Type-Options: nosniff
|