WordPress / WordPress/wordpress-playground

CORS Error when using ?blueprint-url reference to github.com

Open
#2,148 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Package][@wp-playground] Blueprints [Type] Bug
Dominant language
JavaScript
Stars
2k
Forks
462
Avg merge
18h 44m
Merged PRs (30d)
33

Description

Although using GitHub.com URLs for file references inside blueprints works, well, when trying to reference the github.com URL in a queryparam of playground throws and CORS error

Image
Example:

❌ Does not work: https://playground.wordpress.net/?blueprint-url=https://github.com/wptrainingteam/hellodashboard/blob/main/blueprint.json

✅ Works: https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wptrainingteam/hellodashboard/main/blueprint.json

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the playground handles the blueprint-url query parameter and reproduce the issue with the GitHub blob URL and the working raw URL from the report. Done means the supported GitHub reference loads without a CORS error, or the handling clearly reports that only raw URLs are supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.