mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-01 16:01:26 +02:00
concurrently build config
This commit is contained in:
parent
e85611b7d0
commit
6dea25e0a2
5 changed files with 158 additions and 99 deletions
|
@ -300,8 +300,6 @@ type Options struct {
|
|||
AuditKey *PublicKeyEncryptionKeyOptions `mapstructure:"audit_key"`
|
||||
|
||||
BrandingOptions httputil.BrandingOptions
|
||||
|
||||
DisableValidation bool
|
||||
}
|
||||
|
||||
type certificateFilePair struct {
|
||||
|
@ -462,7 +460,7 @@ func (o *Options) parsePolicy() error {
|
|||
}
|
||||
}
|
||||
for i := range o.AdditionalPolicies {
|
||||
p := &o.AdditionalPolicies[i]
|
||||
p := o.AdditionalPolicies[i]
|
||||
if err := p.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -579,10 +577,6 @@ func bindEnvsRecursive(t reflect.Type, v *viper.Viper, keyPrefix, envPrefix stri
|
|||
|
||||
// Validate ensures the Options fields are valid, and hydrated.
|
||||
func (o *Options) Validate() error {
|
||||
if o.DisableValidation {
|
||||
return nil
|
||||
}
|
||||
|
||||
ctx := context.TODO()
|
||||
if !IsValidService(o.Services) {
|
||||
return fmt.Errorf("config: %s is an invalid service type", o.Services)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue