-
Notifications
You must be signed in to change notification settings - Fork 11
Configurations for DApp Testing
Yuanjun edited this page Nov 1, 2019
·
4 revisions
AionR Kernel, by default, only support local connection and does not allow any tool or website to connect to the Kernel.
Default Configuration:
[http]
interface = "local"
hosts = ["none"] # equivalent to []
cors = ["none"] # equivalent to []
[websockets]
interface = "local"
origins = ["none"] # equivalent to []
hosts = ["none"] # equivalent to []
In order to let DApps and other tools connect to the Kernel remotely, edit configuration interface
field in each section:
-
interface = "local"
orinterface = "127.0.0.1"
only allows the connections to "127.0.0.1" or "localhost"; -
interface = [public IP address]
only allows the connections to that public address; -
interface = "0.0.0.0"
allows all the connections.
In order to let other web hosts communicate with AionR Kernel, you need to add the hostname into the hosts
field in [rpc]
and [websockets]
section; if you want to grant permission for all websites, let hosts = ["all"]
.
Kernel, by default, enabled Cross-Origin Resource Sharing. To make sure other developing tools or extension tools connect to Kernel, edit configuration cors
field in [rpc]
section or origins
field in [websockets]
:
-
cors = ["none"]
andorigins = ["none"]
does NOT allow any origin; -
cors = ["all"]
andorigins = ["all"]
allows requests from any origin; -
cors = ["chrome-extension://*","moz-extension://*"]
andorigins = ["chrome-extension://*","moz-extension://*"]
allows the requests from chrome and firefox extensions.
Basic
Kernel Configuration
- Build AionR Kernel
- JSON-RPC APIs Doc
- JSON-RPC APIs Rust vs Java
- Wallet
- Genesis Block
- Configuration File and Command Line Interface
- Log Targets Table
- Aion Seed Nodes
- Migration From 0.1.* to 0.2
DApp Developers
Tutorials