Skip to content

site: let the CSP load CrawlProof stats and ads - #86

Merged
ralyodio merged 1 commit into
mainfrom
fix/csp-allow-crawlproof
Nov 23, 2026
Merged

ralyodio merged 1 commit into
mainfrom
fix/csp-allow-crawlproof

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Why

The CrawlProof dashboard for diskpush.com reads zero. The layout has the stats.js and ad.js tags with the right data-site, but the Content-Security-Policy from #5 never listed crawlproof.com:

  • script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net refuses both scripts
  • connect-src 'self' https://api.github.com would refuse the page view beacon anyway

What

  • script-src and connect-src allow https://crawlproof.com
  • img-src allows any https origin and media-src allows the CrawlProof hosts: ad creatives render in a srcdoc frame that inherits this policy

Check

After deploy: curl -sI https://diskpush.com | grep -i content-security lists crawlproof.com, and a browser load records a page view.

🤖 Generated with Claude Code

The layout has carried the stats.js and ad.js tags since launch, but the
Content-Security-Policy added in #5 never listed crawlproof.com in
script-src or connect-src. Every browser refused both scripts, so the
CrawlProof dashboard for diskpush.com read zero visitors.

Allow crawlproof.com for scripts and beacons, and ad creative images and
media for the srcdoc ad frame, which inherits this policy.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 9f20c46 into main Nov 23, 2026
4 checks passed
@ralyodio
ralyodio deleted the fix/csp-allow-crawlproof branch November 23, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant