diff --git a/services/antivirus/pkg/config/config.go b/services/antivirus/pkg/config/config.go index 7aee2920a..84a6f1d32 100644 --- a/services/antivirus/pkg/config/config.go +++ b/services/antivirus/pkg/config/config.go @@ -10,7 +10,7 @@ type Config struct { File string Log *Log - Debug Debug `mask:"struct" yaml:"debug"` + Debug Debug `yaml:"debug" mask:"struct"` Service Service `yaml:"-"` @@ -23,7 +23,7 @@ type Config struct { Scanner Scanner MaxScanSize string `yaml:"max-scan-size" env:"ANTIVIRUS_MAX_SCAN_SIZE" desc:"The maximum scan size the virus scanner can handle. Only this many bytes of a file will be scanned. 0 means unlimited and is the default. Usable common abbreviations: [KB, KiB, MB, MiB, GB, GiB, TB, TiB, PB, PiB, EB, EiB], example: 2GB." introductionVersion:"pre5.0"` - Context context.Context `yaml:"-" json:"-"` + Context context.Context `json:"-" yaml:"-"` DebugScanOutcome string `yaml:"-" env:"ANTIVIRUS_DEBUG_SCAN_OUTCOME" desc:"A predefined outcome for virus scanning, FOR DEBUG PURPOSES ONLY! (example values: 'found,infected')" introductionVersion:"pre5.0"` } diff --git a/services/antivirus/pkg/service/service.go b/services/antivirus/pkg/service/service.go index 103f68037..099228dd0 100644 --- a/services/antivirus/pkg/service/service.go +++ b/services/antivirus/pkg/service/service.go @@ -91,7 +91,7 @@ func (av Antivirus) Run() error { evtsCfg := av.c.Events var rootCAPool *x509.CertPool - if evtsCfg.TLSRootCACertificate != "" { + if av.c.Events.TLSRootCACertificate != "" { rootCrtFile, err := os.Open(evtsCfg.TLSRootCACertificate) if err != nil { return err @@ -104,7 +104,7 @@ func (av Antivirus) Run() error { rootCAPool = x509.NewCertPool() rootCAPool.AppendCertsFromPEM(certBytes.Bytes()) - evtsCfg.TLSInsecure = false + av.c.Events.TLSInsecure = false } natsStream, err := stream.NatsFromConfig(av.c.Service.Name, false, stream.NatsConfig(av.c.Events))