Skip to content

Commit

Permalink
Rename APIAllowedOrigins to HTTPAllowedOrigins (ava-labs#1567)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-kim authored Jun 1, 2023
1 parent 484b735 commit 4debc0e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,15 @@ func getHTTPConfig(v *viper.Viper) (node.HTTPConfig, error) {
MetricsAPIEnabled: v.GetBool(MetricsAPIEnabledKey),
HealthAPIEnabled: v.GetBool(HealthAPIEnabledKey),
},
HTTPHost: v.GetString(HTTPHostKey),
HTTPPort: uint16(v.GetUint(HTTPPortKey)),
HTTPSEnabled: v.GetBool(HTTPSEnabledKey),
HTTPSKey: httpsKey,
HTTPSCert: httpsCert,
APIAllowedOrigins: v.GetStringSlice(HTTPAllowedOrigins),
HTTPAllowedHosts: v.GetStringSlice(HTTPAllowedHostsKey),
ShutdownTimeout: v.GetDuration(HTTPShutdownTimeoutKey),
ShutdownWait: v.GetDuration(HTTPShutdownWaitKey),
HTTPHost: v.GetString(HTTPHostKey),
HTTPPort: uint16(v.GetUint(HTTPPortKey)),
HTTPSEnabled: v.GetBool(HTTPSEnabledKey),
HTTPSKey: httpsKey,
HTTPSCert: httpsCert,
HTTPAllowedOrigins: v.GetStringSlice(HTTPAllowedOrigins),
HTTPAllowedHosts: v.GetStringSlice(HTTPAllowedHostsKey),
ShutdownTimeout: v.GetDuration(HTTPShutdownTimeoutKey),
ShutdownWait: v.GetDuration(HTTPShutdownWaitKey),
}

config.APIAuthConfig, err = getAPIAuthConfig(v)
Expand Down
4 changes: 2 additions & 2 deletions node/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ type HTTPConfig struct {
HTTPSKey []byte `json:"-"`
HTTPSCert []byte `json:"-"`

APIAllowedOrigins []string `json:"apiAllowedOrigins"`
HTTPAllowedHosts []string `json:"httpAllowedHosts"`
HTTPAllowedOrigins []string `json:"httpAllowedOrigins"`
HTTPAllowedHosts []string `json:"httpAllowedHosts"`

ShutdownTimeout time.Duration `json:"shutdownTimeout"`
ShutdownWait time.Duration `json:"shutdownWait"`
Expand Down
4 changes: 2 additions & 2 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ func (n *Node) initAPIServer() error {
n.LogFactory,
n.Config.HTTPHost,
n.Config.HTTPPort,
n.Config.APIAllowedOrigins,
n.Config.HTTPAllowedOrigins,
n.Config.ShutdownTimeout,
n.ID,
n.Config.TraceConfig.Enabled,
Expand All @@ -611,7 +611,7 @@ func (n *Node) initAPIServer() error {
n.LogFactory,
n.Config.HTTPHost,
n.Config.HTTPPort,
n.Config.APIAllowedOrigins,
n.Config.HTTPAllowedOrigins,
n.Config.ShutdownTimeout,
n.ID,
n.Config.TraceConfig.Enabled,
Expand Down

0 comments on commit 4debc0e

Please sign in to comment.