mirror of
https://github.com/go-acme/lego
synced 2026-03-14 14:35:48 +01:00
timewebcloud: fix subdomain support (#2845)
This commit is contained in:
parent
dc51d5ee65
commit
1991339cc1
2 changed files with 6 additions and 9 deletions
|
|
@ -3,9 +3,11 @@ package internal
|
|||
import "fmt"
|
||||
|
||||
type DNSRecord struct {
|
||||
ID int `json:"id,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Value string `json:"value,omitempty"`
|
||||
ID int `json:"id,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Value string `json:"value,omitempty"`
|
||||
|
||||
// SubDomain is the full name of a subdomain (not only the subdomain label).
|
||||
SubDomain string `json:"subdomain,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,15 +110,10 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
|
|||
return fmt.Errorf("timewebcloud: could not find zone for domain %q: %w", domain, err)
|
||||
}
|
||||
|
||||
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
|
||||
if err != nil {
|
||||
return fmt.Errorf("timewebcloud: %w", err)
|
||||
}
|
||||
|
||||
record := internal.DNSRecord{
|
||||
Type: "TXT",
|
||||
Value: info.Value,
|
||||
SubDomain: subDomain,
|
||||
SubDomain: dns01.UnFqdn(info.EffectiveFQDN),
|
||||
}
|
||||
|
||||
response, err := d.client.CreateRecord(context.Background(), authZone, record)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue