Skip to content

Restore site embed framing - #1097

Merged
tannerlinsley merged 2 commits into
mainfrom
agent/allow-site-embeds
Aug 3, 2026
Merged

Restore site embed framing#1097
tannerlinsley merged 2 commits into
mainfrom
agent/allow-site-embeds

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Aug 2, 2026

Copy link
Copy Markdown
Member

What changed

Allow the existing /partners-embed and /sponsors-embed documents to bypass the worker's global X-Frame-Options: DENY header, alongside the npm stats and Charts embed routes.

Root cause and impact

The Cloudflare worker applies X-Frame-Options: DENY to every response, then removes it only for paths recognized by isFrameEmbeddingAllowed. The two long-standing site embed routes were missing from that allowlist, so browsers refused to render the partner iframe used by the TanStack Start overview. The sponsors embed was broken by the same omission.

This restores the intended iframe behavior only for the two explicit embed documents. All regular partner, sponsor, and site pages retain the global frame denial.

Closes #1096

Validation

  • pnpm test
  • TypeScript and type-aware lint clean
  • 143 tests passed; 1 environment-gated docs smoke test skipped
  • Focused frame-embedding regression test
  • Commit hook reran formatting and the full test gate successfully
  • git diff --check

Risk

Low. The security-header exception is limited to two routes whose sole purpose is iframe embedding, with negative coverage for their normal page counterparts.

Summary by CodeRabbit

  • New Features

    • Added support for embedding partner and sponsor pages in external frames.
  • Bug Fixes

    • Updated frame-embedding validation to recognize the newly supported embed paths.

@tannerlinsley tannerlinsley added the source-audit Tracked by the automated source audit label Aug 2, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 2, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 12a093b Commit Preview URL

Branch Preview URL
Aug 03 2026, 04:09 AM

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d0ab7d43-92e8-4d7c-a747-04c310c28799

📥 Commits

Reviewing files that changed from the base of the PR and between 898909e and 638f91e.

📒 Files selected for processing (2)
  • src/utils/frame-embedding.ts
  • tests/charts-catalog-frame-embedding.test.ts

📝 Walkthrough

Walkthrough

The frame embedding allowlist now permits /partners-embed and /sponsors-embed. Tests verify both paths and retain coverage for existing embed paths.

Changes

Frame embedding allowlist

Layer / File(s) Summary
Allowlist and validation
src/utils/frame-embedding.ts, tests/charts-catalog-frame-embedding.test.ts
isFrameEmbeddingAllowed accepts the partner and sponsor embed paths. Tests verify the new paths and existing embed cases.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes restoring iframe framing for the embed routes changed by this pull request.
Linked Issues check ✅ Passed The changes allow /partners-embed, satisfying issue #1096, and add regression coverage for the affected embed routes.
Out of Scope Changes check ✅ Passed The changes are limited to frame-embedding behavior and related tests, which directly support the stated objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/allow-site-embeds

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tannerlinsley
tannerlinsley merged commit 2831d12 into main Aug 3, 2026
5 of 7 checks passed
@tannerlinsley
tannerlinsley deleted the agent/allow-site-embeds branch August 3, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

source-audit Tracked by the automated source audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Partner embed on TanStack Start Overview does not render due to iframe restriction

1 participant