v0.5.0-rc4: fixing autocert issue, cache ACME registration, added ls-config option

This commit is contained in:
yusing
2024-09-17 08:41:36 +08:00
parent 04fd6543fd
commit 82f06374f7
33 changed files with 301 additions and 221 deletions

View File

@@ -34,16 +34,16 @@ func (p *FileProvider) String() string {
func (p *FileProvider) GetProxyEntries() (M.ProxyEntries, E.NestedError) {
entries := M.NewProxyEntries()
data, err := E.Check(os.ReadFile(p.path))
if err.IsNotNil() {
if err.HasError() {
return entries, E.Failure("read file").Subject(p).With(err)
}
ne := E.Failure("validation").Subject(p)
if !common.NoSchemaValidation {
if err = Validate(data); err.IsNotNil() {
if err = Validate(data); err.HasError() {
return entries, ne.With(err)
}
}
if err = entries.UnmarshalFromYAML(data); err.IsNotNil() {
if err = entries.UnmarshalFromYAML(data); err.HasError() {
return entries, ne.With(err)
}
return entries, E.Nil()