Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
add enable unsafe cors flag (#995)
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-facs authored Mar 15, 2022
1 parent 49afc0f commit 5360730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ const (
GRPCWebAddress = "grpc-web.address"
)

// RPCEnable Defines if Cosmos-sdk REST server should be enabled
// Cosmos API flags
const (
RPCEnable = "api.enable"
RPCEnable = "api.enable"
EnabledUnsafeCors = "api.enabled-unsafe-cors"
)

// JSON-RPC flags
Expand Down
1 change: 1 addition & 0 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ which accepts a path for the resulting pprof file.
cmd.Flags().String(srvflags.GRPCWebAddress, serverconfig.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on")

cmd.Flags().Bool(srvflags.RPCEnable, false, "Defines if Cosmos-sdk REST server should be enabled")
cmd.Flags().Bool(srvflags.EnabledUnsafeCors, false, "Defines if CORS should be enabled (unsafe - use it at your own risk)")

cmd.Flags().Bool(srvflags.JSONRPCEnable, true, "Define if the gRPC server should be enabled")
cmd.Flags().StringSlice(srvflags.JSONRPCAPI, config.GetDefaultAPINamespaces(), "Defines a list of JSON-RPC namespaces that should be enabled")
Expand Down

0 comments on commit 5360730

Please sign in to comment.