Fixed bugs caused by DNS challenge PR

- Fixed concurrency in EAB and DNS credential save
- Fixed missing CA name in ACME Obtain certificate handler
- Optimized acmedns code config
- Fixed a lot of front-end bugs in acme snippet
This commit is contained in:
Toby Chui
2024-05-14 16:21:47 +08:00
parent 3454a9b975
commit ce4f46cb50
8 changed files with 593 additions and 908 deletions

View File

@@ -176,6 +176,8 @@ func main() {
Title: fields[0],
Datatype: fields[1],
})
} else if fields[0] == "TTL" {
//haveTTLField = true
} else {
hiddenKeys = append(hiddenKeys, &Field{
Title: fields[0],
@@ -210,17 +212,15 @@ func main() {
HiddenFields: hiddenKeys,
}
//Generate the code for it
//Generate the code for converting incoming json into target config
codeSegment := `
case "` + providerName + `":
cfg := ` + providerName + `.Config{}
cfg := ` + providerName + `.NewDefaultConfig()
err := json.Unmarshal([]byte(js), &cfg)
if err != nil {
return nil, err
}
return ` + providerName + `.NewDNSProviderConfig(&cfg)`
return ` + providerName + `.NewDNSProviderConfig(cfg)`
generatedConvertcode += codeSegment
importList += ` "github.com/go-acme/lego/v4/providers/dns/` + providerName + "\"\n"