diff --git a/client/client.go b/client/client.go index 2be54fe..3f1f0c8 100644 --- a/client/client.go +++ b/client/client.go @@ -56,8 +56,7 @@ type Client struct { } type Domain struct { - Domain string `json:"domain"` - IncludeWWW bool `json:"includeWWW,omitempty"` + Domain string `json:"domain"` } type Option func(*Client) @@ -355,24 +354,9 @@ func (c *Client) CheckDomainNames(domains []string) ([]models.DomainResponse, er func (c *Client) RequestCertificate(domains []string, csr string, transactionType string, organization models.OrganizationResponse) (*models.CertificateRequestResponse, error) { c.loginLock.RLock() defer c.loginLock.RUnlock() - - // Harica currently does not permit leading "www." in domains and - // requires the "includeWWW" option. It's not possible to create a - // certificate with only a domain with a leading "www.". - domainsMap := make(map[string]bool) - for _, domain := range domains { - domainsMap[domain] = true - } var domainDto []Domain for _, domain := range domains { - if strings.HasPrefix(domain, "www.") && - domainsMap[strings.TrimPrefix(domain, "www.")] { - continue - } - domainDto = append(domainDto, Domain{ - Domain: domain, - IncludeWWW: domainsMap["www."+domain], - }) + domainDto = append(domainDto, Domain{Domain: domain}) } // Ensure that the CSR is in the correct format so we parse it and transform it again