webxdc / webxdc-dev

A development server for webxdc apps
The Unlicense
20 stars 4 forks source link

Apps can't `fetch()` anything #46

Closed WofWca closed 11 months ago

WofWca commented 11 months ago

Reproduction

  1. Create an app that executes fetch('/index.html').then(console.log)
  2. Serve the app on a local server. Say, python -m http.server 8000.
  3. webxdc-dev run http://localhost:8000.

Expected result

fetch succeeds.

Actual result

fetch fails because of connect-src CSP: default-src 'self' ;connect-src ws://localhost:7001 ws://localhost:8000.

Extra info

I think 'self' should be present it connect-src, I don't know why it's just ws://.