Skip to content

Commit 59c1850

Browse files
committed
docs: README: add info about --no-csp
Follow-up to 065fba8, d14fa47
1 parent 1ffe114 commit 59c1850

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,23 @@ the base port number using `--port`, so for instance:
115115
webxdc-dev run --port 4000 /path/to/webxdc/project
116116
```
117117

118+
### Turning off Content Security Policy (CSP)
119+
120+
By default the tool does best-effort network-isolation
121+
using Content Security Policy (CSP) in an attempt
122+
to simulate a real webxdc environment.
123+
However, some existing apps might depend on third-party services
124+
(such as CDNs to load fonts from).
125+
If you're trying to port such an app to webxdc, you will get errors like
126+
"failed to fetch https://some-cdn.com/app-translation.json".
127+
128+
In this case you can temporarily disable network isolation,
129+
until you get around to getting rid of such network dependencies.
130+
131+
```shell
132+
webxdc-dev run --no-csp http://localhost:8080
133+
```
134+
118135
### Verbose
119136

120137
By default the dev tool does not log messages. You can change this by using

0 commit comments

Comments
 (0)