1
0
mirror of https://github.com/containous/traefik.git synced 2025-09-28 09:44:21 +03:00

Merge pull request #582 from containous/fix-acme-tos

Fix ACME TOS
This commit is contained in:
Emile Vauge
2016-08-02 13:41:05 +02:00
committed by GitHub

View File

@@ -275,6 +275,20 @@ func (a *ACME) CreateConfig(tlsConfig *tls.Config, CheckOnDemandDomain func(doma
// The client has a URL to the current Let's Encrypt Subscriber
// Agreement. The user will need to agree to it.
err = client.AgreeToTOS()
if err != nil {
// Let's Encrypt Subscriber Agreement renew ?
reg, err := client.QueryRegistration()
if err != nil {
return err
}
account.Registration = reg
err = client.AgreeToTOS()
if err != nil {
log.Errorf("Error sending ACME agreement to TOS: %+v: %s", account, err.Error())
}
}
// save account
err = a.saveAccount(account)
if err != nil {
return err
}