Skip to content

Commit

Permalink
Merge pull request #237 from eastebry/master
Browse files Browse the repository at this point in the history
Adding [allow|deny]_addresses settings to yaml config file
  • Loading branch information
jjiang-stripe authored Nov 4, 2024
2 parents 523d927 + 5b0cc7a commit 1c315f8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/smokescreen/config_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ type yamlConfig struct {
Port *uint16
DenyRanges []string `yaml:"deny_ranges"`
AllowRanges []string `yaml:"allow_ranges"`
DenyAddresses []string `yaml:"deny_addresses"`
AllowAddresses []string `yaml:"allow_addresses"`
Resolvers []string `yaml:"resolver_addresses"`
StatsdAddress string `yaml:"statsd_address"`
EgressAclFile string `yaml:"acl_file"`
Expand Down Expand Up @@ -81,6 +83,16 @@ func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
return err
}

err = c.SetDenyAddresses(yc.DenyAddresses)
if err != nil {
return err
}

err = c.SetAllowAddresses(yc.AllowAddresses)
if err != nil {
return err
}

err = c.SetResolverAddresses(yc.Resolvers)
if err != nil {
return err
Expand Down

0 comments on commit 1c315f8

Please sign in to comment.