graphql-voyager: Run Graphql-voyager broken

I try to run locally Graphql-Voyager, but the graph is not loading, due

Failed to load http://cdn.jsdelivr.net/npm/graphql-voyager@1.0.0-rc.15/dist/voyager.worker.js: Redirect from ‘http://cdn.jsdelivr.net/npm/graphql-voyager@1.0.0-rc.15/dist/voyager.worker.js’ to ‘https://cdn.jsdelivr.net/npm/graphql-voyager@1.0.0-rc.15/dist/voyager.worker.js’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8080’ is therefore not allowed access. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

The issue seems related to a change in https://www.jsdelivr.com/

jsDelivr is becoming HTTPS-only. All HTTP requests are redirected to HTTPS. HSTS is going to be enabled in a few days.

The current code in middleware/render-voyager-page is importing the dependencies in this way: <script src=\"//cdn.jsdelivr.net/fetch/2.0.1/fetch.min.js\">

Instead now have to be : <script src=\"https://cdn.jsdelivr.net/fetch/2.0.1/fetch.min.js\">

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

v1.0.0-rc.20 -> v1.0.0-rc.25 to fix a simple url issue

We’ve nailed it 🙈😂! (special thanks go to @IvanGoncharov 👏)

meme

We are eagerly awaiting your 2.0.0 so that we can grab from npm, mostly to fix this jsdelivr issue! Thanks so much for the good work!

Thank you for the PR, but for middleware middleware/render-voyager-page would it be possible to use a local file instead of the one from the cdn? That way it could work offline locally.