server: remove cors config fron JSON-RPC (#465)

This commit is contained in:
Federico Kunze Küllmer
2021-08-20 10:58:03 +00:00
committed by GitHub
parent 6f145da328
commit 9ea2ce4b8f
6 changed files with 30 additions and 28 deletions
+14 -3
View File
@@ -36,8 +36,19 @@ ethermintd start --json-rpc.gas-cap 0
## CORS
If accessing the RPC from a browser, CORS will need to be enabled with the appropriate domain set. Otherwise, JavaScript calls are limit by the same-origin policy and requests will fail:
If accessing the RPC from a browser, CORS will need to be enabled with the appropriate domain set. Otherwise, JavaScript calls are limit by the same-origin policy and requests will fail.
```bash
ethermintd start --json-rpc.enable-unsafe-cors
The CORS setting can be updated from the `app.toml`
```toml
###############################################################################
### API Configuration ###
###############################################################################
[api]
# ...
# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk).
enabled-unsafe-cors = true # default false
```