Add CrawlProof ad unit#134
Merged
Merged
Conversation
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
Revert the all-pages ad injection in the root layout; render the banner via a client-gated BlogAd component inside the blog layout so it only shows on /blog/* and never to signed-in users. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Render the CrawlProof banner as a plain cross-origin <iframe> pointing at the new /api/ads/frame endpoint rather than the data-cp-ad + ad.js path. The ad now renders and follows through to the destination without ad.js, and the click link lives inside CrawlProof's own document so the PWA's JS (visibility handlers, service worker) can't interrupt the click-through. Still gated to logged-out visitors on /blog/*. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Keep the stock CrawlProof snippet (data-cp-ad div + ad.js) rather than a custom iframe; only retain the /blog/* scoping and logged-out gating. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Keep the standard data-cp-ad + ad.js snippet as the primary path; add a no-JS <noscript> fallback that renders the plain /api/ads/frame iframe so the ad still shows and is clickable when JavaScript is disabled (Tor Safest mode, .onion). Exactly one path renders per visitor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the CrawlProof ad unit so this site can show network ads and earn crypto for clicks.
4a5b5f93-ebd9-4d02-b927-05544fdeb81ebanner_300x250src/app/layout.jsxbefore</body>.The unit renders inside a sandboxed iframe and never blocks page load. Manage the slot at https://crawlproof.com/ads/slots