Skip to content

Commit 99970a3

Browse files
committed
Rename APIAllowedOrigins to HTTPAllowedOrigins
1 parent 8fb8afe commit 99970a3

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

config/config.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,14 @@ func getHTTPConfig(v *viper.Viper) (node.HTTPConfig, error) {
238238
MetricsAPIEnabled: v.GetBool(MetricsAPIEnabledKey),
239239
HealthAPIEnabled: v.GetBool(HealthAPIEnabledKey),
240240
},
241-
HTTPHost: v.GetString(HTTPHostKey),
242-
HTTPPort: uint16(v.GetUint(HTTPPortKey)),
243-
HTTPSEnabled: v.GetBool(HTTPSEnabledKey),
244-
HTTPSKey: httpsKey,
245-
HTTPSCert: httpsCert,
246-
APIAllowedOrigins: v.GetStringSlice(HTTPAllowedOrigins),
247-
ShutdownTimeout: v.GetDuration(HTTPShutdownTimeoutKey),
248-
ShutdownWait: v.GetDuration(HTTPShutdownWaitKey),
241+
HTTPHost: v.GetString(HTTPHostKey),
242+
HTTPPort: uint16(v.GetUint(HTTPPortKey)),
243+
HTTPSEnabled: v.GetBool(HTTPSEnabledKey),
244+
HTTPSKey: httpsKey,
245+
HTTPSCert: httpsCert,
246+
HTTPAllowedOrigins: v.GetStringSlice(HTTPAllowedOrigins),
247+
ShutdownTimeout: v.GetDuration(HTTPShutdownTimeoutKey),
248+
ShutdownWait: v.GetDuration(HTTPShutdownWaitKey),
249249
}
250250

251251
config.APIAuthConfig, err = getAPIAuthConfig(v)

node/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type HTTPConfig struct {
5353
HTTPSKey []byte `json:"-"`
5454
HTTPSCert []byte `json:"-"`
5555

56-
APIAllowedOrigins []string `json:"apiAllowedOrigins"`
56+
HTTPAllowedOrigins []string `json:"httpAllowedOrigins"`
5757

5858
ShutdownTimeout time.Duration `json:"shutdownTimeout"`
5959
ShutdownWait time.Duration `json:"shutdownWait"`

node/node.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ func (n *Node) initAPIServer() error {
588588
n.LogFactory,
589589
n.Config.HTTPHost,
590590
n.Config.HTTPPort,
591-
n.Config.APIAllowedOrigins,
591+
n.Config.HTTPAllowedOrigins,
592592
n.Config.ShutdownTimeout,
593593
n.ID,
594594
n.Config.TraceConfig.Enabled,
@@ -610,7 +610,7 @@ func (n *Node) initAPIServer() error {
610610
n.LogFactory,
611611
n.Config.HTTPHost,
612612
n.Config.HTTPPort,
613-
n.Config.APIAllowedOrigins,
613+
n.Config.HTTPAllowedOrigins,
614614
n.Config.ShutdownTimeout,
615615
n.ID,
616616
n.Config.TraceConfig.Enabled,

0 commit comments

Comments
 (0)