Skip to content

Commit

Permalink
Format issue regarding naming of config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisse-Meruma committed Dec 18, 2024
1 parent 4183039 commit e07c42b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ grpc_allow_insecure: false
# - "*" to allow access from any origin (not recommended for sensitive data).
# - "http://example.com" to only allow access from a specific origin.
# - "" to disable Cross-Origin Resource Sharing (CORS).
Access-Control-Allow-Origin: ""
access_control_allow_origin: ""

# The Noise section includes specific configuration for the
# TS2021 Noise protocol
Expand Down
4 changes: 2 additions & 2 deletions hscontrol/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func LoadConfig(path string, isFile bool) error {
viper.SetDefault("tuning.batch_change_delay", "800ms")
viper.SetDefault("tuning.node_mapsession_buffered_chan_size", 30)

viper.SetDefault("Access-Control-Allow-Origin", "")
viper.SetDefault("access_control_allow_origin", "")

viper.SetDefault("prefixes.allocation", string(IPAllocationStrategySequential))

Expand Down Expand Up @@ -872,7 +872,7 @@ func LoadServerConfig() (*Config, error) {
GRPCAllowInsecure: viper.GetBool("grpc_allow_insecure"),
DisableUpdateCheck: false,

AccessControlAllowOrigins: viper.GetString("Access-Control-Allow-Origin"),
AccessControlAllowOrigins: viper.GetString("access_control_allow_origin"),

PrefixV4: prefix4,
PrefixV6: prefix6,
Expand Down

0 comments on commit e07c42b

Please sign in to comment.