Skip to content

Commit fb69a27

Browse files
authored
Merge pull request #49 from webxdc/document-no-csp
docs: README: add info about `--no-csp`
2 parents 3c8a002 + 59c1850 commit fb69a27

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
@@ -117,6 +117,23 @@ the base port number using `--port`, so for instance:
117117
webxdc-dev run --port 4000 /path/to/webxdc/project
118118
```
119119

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

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

0 commit comments

Comments
 (0)