تتطلب AdSense و GA4 و Turnstile سماحيات محددة لسياسة أمن المحتوى (CSP). السياسة الصارمة ستحظرهم افتراضياً.
استخدم هذا الأساس في src/proxy.ts (nonce-based CSP):
script-src 'self' 'nonce-{RUNTIME_NONCE}' 'strict-dynamic' https://www.googletagmanager.com https://www.google-analytics.com https://pagead2.googlesyndication.com https://fundingchoicesmessages.google.com https://tpc.googlesyndication.com https://googleads.g.doubleclick.net;
style-src 'self' 'nonce-{RUNTIME_NONCE}';
style-src-attr 'unsafe-inline';
connect-src 'self' https://www.google-analytics.com https://region1.google-analytics.com https://www.googletagmanager.com https://pagead2.googlesyndication.com https://googleads.g.doubleclick.net https://adtrafficquality.google https://ep1.adtrafficquality.google https://ep2.adtrafficquality.google https://fundingchoicesmessages.google.com https://challenges.cloudflare.com;
frame-src 'self' https://challenges.cloudflare.com https://googleads.g.doubleclick.net https://tpc.googlesyndication.com https://fundingchoicesmessages.google.com https://adtrafficquality.google https://ep1.adtrafficquality.google https://ep2.adtrafficquality.google https://www.google.com;