diff --git a/internal/config/types.go b/internal/config/types.go index fe3bc1773..38b03e7ab 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -367,14 +367,6 @@ func (col *Collector) Validate(allowedDirectories []string) error { err = errors.Join(err, nginxReceiver.Validate(allowedDirectories)) } - for _, path := range col.AdditionalConfigPaths { - cleanPath := filepath.Clean(path) - pathAllowed := isAllowedDir(cleanPath, allowedDirectories) - if !pathAllowed { - err = errors.Join(err, fmt.Errorf("additional config path %s not in allowed directories", path)) - } - } - return err }