Skip to content

Fix the HTML preview locally#1456

Open
zetter-rpf wants to merge 1 commit intomainfrom
fix-html-iframe-locally
Open

Fix the HTML preview locally#1456
zetter-rpf wants to merge 1 commit intomainfrom
fix-html-iframe-locally

Conversation

@zetter-rpf
Copy link
Copy Markdown
Contributor

@zetter-rpf zetter-rpf commented May 7, 2026

Found while working on https://github.com/RaspberryPiFoundation/digital-editor-issues/issues/1379

In production we have a cloudflare rule that allows cross-origin requests. Without this the iframe does not render in locally (tested in Chrome).

In production we have a cloudflare rule that allows cross-origin requests. Without this the iframe does not render in Chrome.
@zetter-rpf zetter-rpf marked this pull request as ready for review May 7, 2026 09:54
Copilot AI review requested due to automatic review settings May 7, 2026 09:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the local webpack dev server configuration so the HTML preview iframe can render locally (matching production’s cross-origin behavior managed by Cloudflare).

Changes:

  • Extend the devServer middleware to set Cross-Origin-Resource-Policy: cross-origin for html-renderer.html.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zetter-rpf zetter-rpf requested a review from abcampo-iry May 8, 2026 10:04
@zetter-rpf
Copy link
Copy Markdown
Contributor Author

@abcampo-iry thought you would be a good reviewer as you had the same problem

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.

2 participants