Skip to content

Comments

chore: add headers to allow embedding to Framer#3

Merged
vancura merged 2 commits intomainfrom
framer-embed
Dec 22, 2025
Merged

chore: add headers to allow embedding to Framer#3
vancura merged 2 commits intomainfrom
framer-embed

Conversation

@vancura
Copy link
Collaborator

@vancura vancura commented Dec 22, 2025

This PR adds HTTP header configuration and build support to allow embedding the site in Framer and ambilab.com iframes.

Changes made:

  1. public/_headers

    • New Cloudflare Pages headers file.
    • Adds Content-Security-Policy frame-ancestors allowing https://ambilab.com and https://*.framer.app.
    • Adds X-Frame-Options set to ALLOW-FROM https://ambilab.com.
    • Includes file-level comments explaining the configuration.
  2. vite.config.ts

    • Adds a viteStaticCopy target to copy public/_headers to the build output root (.) alongside the existing fonts copy target.
  3. docs/WORKFLOW-SUMMARY.md

    • Updates a related documentation URL to point to the repository tree main path for the CI/workflows link (no functional changes).

These changes enable embedding the demo site in Framer sites and on ambilab.com.

Signed-off-by: Václav Vančura <commit@vancura.dev>
@coderabbitai
Copy link

coderabbitai bot commented Dec 22, 2025

Walkthrough

Adds a new Cloudflare Pages headers file and updates Vite to copy it into the project root; also adjusts a documentation link in WORKFLOW-SUMMARY.md.

Changes

Cohort / File(s) Change Summary
Cloudflare Pages headers
public/_headers, vite.config.ts
Added public/_headers with Content-Security-Policy and X-Frame-Options directives; updated vite.config.ts to include a static copy target that copies _headers to the project root during build.
Documentation link update
docs/WORKFLOW-SUMMARY.md
Updated a Related Documentation URL to point to the repository tree main path for the CI workflows directory.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: adding headers for Framer embedding, which aligns with the primary modifications to enable frame-ancestors and X-Frame-Options headers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch framer-embed

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 554a5b7 and 3c21c31.

📒 Files selected for processing (1)
  • docs/WORKFLOW-SUMMARY.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
docs/WORKFLOW-SUMMARY.md (1)

103-103: Valid URL fix, but consider PR scope.

The updated GitHub URL is correct—it now includes /tree/main/ which is required for GitHub's web interface to properly resolve directory links. The old format would not work as a clickable reference.

However, this documentation change appears unrelated to the PR objective of adding headers for Framer embedding. Consider whether this belongs in the current PR or should be addressed separately. If multiple unrelated fixes are intentional, ensure they're documented in the PR description for clarity.


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 and usage tips.

Signed-off-by: Václav Vančura <commit@vancura.dev>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 22, 2025

Deploying blit-tech-demos with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3c21c31
Status:🚫  Build failed.

View logs

@vancura vancura merged commit 5bf5134 into main Dec 22, 2025
8 of 10 checks passed
@vancura vancura deleted the framer-embed branch December 22, 2025 15:44
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