mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-10-21 01:59:35 +02:00
Linting and formatting
This commit is contained in:
@@ -432,18 +432,18 @@ func (a *ACMEHandler) HandleGetExpiredDomains(w http.ResponseWriter, r *http.Req
|
||||
// to renew the certificate, and sends a JSON response indicating the result of the renewal process.
|
||||
func (a *ACMEHandler) HandleRenewCertificate(w http.ResponseWriter, r *http.Request) {
|
||||
domainPara, err := utils.PostPara(r, "domains")
|
||||
|
||||
|
||||
//Clean each domain
|
||||
cleanedDomains := []string{}
|
||||
if (domainPara != "") {
|
||||
if domainPara != "" {
|
||||
for _, d := range strings.Split(domainPara, ",") {
|
||||
// Apply normalization on each domain
|
||||
nd, err := utils.NormalizeDomain(d)
|
||||
if err != nil {
|
||||
utils.SendErrorResponse(w, jsonEscape(err.Error()))
|
||||
return
|
||||
}
|
||||
cleanedDomains = append(cleanedDomains, nd)
|
||||
}
|
||||
cleanedDomains = append(cleanedDomains, nd)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,7 +507,6 @@ func (a *ACMEHandler) HandleRenewCertificate(w http.ResponseWriter, r *http.Requ
|
||||
dns = true
|
||||
}
|
||||
|
||||
|
||||
// Default propagation timeout is 300 seconds
|
||||
propagationTimeout := 300
|
||||
if dns {
|
||||
@@ -549,7 +548,6 @@ func (a *ACMEHandler) HandleRenewCertificate(w http.ResponseWriter, r *http.Requ
|
||||
a.Logf("Could not extract SANs from PEM, using domainPara only", err)
|
||||
}
|
||||
|
||||
|
||||
// Extract DNS servers from the request
|
||||
var dnsServers []string
|
||||
dnsServersPara, err := utils.PostPara(r, "dnsServers")
|
||||
|
Reference in New Issue
Block a user