Skip to content

fix: restore referrer for preview requests - #4349

Open
prithq wants to merge 3 commits into
processing:developfrom
prithq:fix/4321-srcdoc-referrer
Open

prithq wants to merge 3 commits into
processing:developfrom
prithq:fix/4321-srcdoc-referrer

Conversation

@prithq

@prithq prithq commented Oct 7, 2026 •

Copy link
Copy Markdown

Issue:

Fixes #4321

The preview iframe was loading the generated sketch HTML through a blob: URL.
Because the document was loaded from a blob: URL, requests made by the sketch
were missing the expected Referer header.

This PR changes the preview to use iframe.srcdoc for the generated HTML instead
of creating a Blob URL for the entire HTML document.

Demo:

Screenshot From 2026-10-08 05-11-37 Screenshot From 2026-10-08 05-11-18

Changes:

Load the generated sketch HTML using iframe.srcdoc.

  • Remove the Blob URL lifecycle used for the generated index.html.
  • Keep Blob URLs for individual local resources such as JavaScript files.
  • Preserve the existing Safari-compatible deferred rendering behavior.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • has no typecheck errors (npm run typecheck)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123
  • meets the standards outlined in the accessibility guidelines

This branch has not been deployed

No deployments
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.

no referrer leading to errors with OpenStreetMap

1 participant