Skip to content

Commit

Permalink
update some configs to let them enabled by default (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vritra4 authored Apr 29, 2024
1 parent 8c1cb8a commit a3b3a3f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/minitiad/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ func initAppConfig() (string, interface{}) {
// In simapp, we set the min gas prices to 0.
srvCfg.MinGasPrices = fmt.Sprintf("0%s", types.BaseDenom)

// Enable API and unsafe CORS (CORS allowed from any host)
srvCfg.API.Enable = true
srvCfg.API.EnableUnsafeCORS = true
srvCfg.API.Address = "tcp://0.0.0.0:1317"

srvCfg.GRPC.Enable = true
srvCfg.GRPC.Address = "tcp://0.0.0.0:9090"

minitiaAppConfig := minitiaAppConfig{
Config: *srvCfg,
EVMConfig: evmconfig.DefaultEVMConfig(),
Expand Down
4 changes: 4 additions & 0 deletions cmd/minitiad/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command {
config := serverCtx.Config
config.SetRoot(clientCtx.HomeDir)

// Configure the server to open RPC port to everyone and allow every origins
config.RPC.ListenAddress = "tcp://0.0.0.0:26657"
config.RPC.CORSAllowedOrigins = []string{"*"}

chainID, _ := cmd.Flags().GetString(flags.FlagChainID)
if chainID == "" {
chainID = fmt.Sprintf("test-chain-%v", cometrand.Str(6))
Expand Down

0 comments on commit a3b3a3f

Please sign in to comment.