use acme relay url as true baseurl
This commit is contained in:
parent
64d12ec535
commit
58dc369ce1
|
@ -61,10 +61,15 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
endpoint := *acmeRelay
|
endpoint := *acmeRelay
|
||||||
|
if !strings.HasSuffix(endpoint, "/") {
|
||||||
|
endpoint += "/"
|
||||||
|
}
|
||||||
|
/*
|
||||||
if strings.HasSuffix(endpoint, "/") {
|
if strings.HasSuffix(endpoint, "/") {
|
||||||
endpoint = endpoint[:len(endpoint)-1]
|
endpoint = endpoint[:len(endpoint)-1]
|
||||||
}
|
}
|
||||||
endpoint += "/api/dns/"
|
endpoint += "/api/dns/"
|
||||||
|
*/
|
||||||
if provider, err = newAPIDNSProvider(endpoint, *token); nil != err {
|
if provider, err = newAPIDNSProvider(endpoint, *token); nil != err {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -516,10 +516,15 @@ func getACMEProvider(acmeRelay, token *string) (challenge.Provider, error) {
|
||||||
return nil, fmt.Errorf("No relay for ACME DNS-01 challenges given to --acme-relay-url")
|
return nil, fmt.Errorf("No relay for ACME DNS-01 challenges given to --acme-relay-url")
|
||||||
}
|
}
|
||||||
endpoint := *acmeRelay
|
endpoint := *acmeRelay
|
||||||
|
if !strings.HasSuffix(endpoint, "/") {
|
||||||
|
endpoint += "/"
|
||||||
|
}
|
||||||
|
/*
|
||||||
if strings.HasSuffix(endpoint, "/") {
|
if strings.HasSuffix(endpoint, "/") {
|
||||||
endpoint = endpoint[:len(endpoint)-1]
|
endpoint = endpoint[:len(endpoint)-1]
|
||||||
}
|
}
|
||||||
//endpoint += "/api/dns/"
|
endpoint += "/api/dns/"
|
||||||
|
*/
|
||||||
if provider, err = newAPIDNSProvider(endpoint, *token); nil != err {
|
if provider, err = newAPIDNSProvider(endpoint, *token); nil != err {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ ACME_AGREE=true
|
||||||
ACME_EMAIL=jon.doe@example.com
|
ACME_EMAIL=jon.doe@example.com
|
||||||
|
|
||||||
# For Let's Encrypt ACME Challenges (pick one)
|
# For Let's Encrypt ACME Challenges (pick one)
|
||||||
ACME_RELAY_URL=http://localhost:4200
|
ACME_RELAY_URL=http://localhost:4200/api/dns
|
||||||
SECRET=xxxxxxxxxxxxxxxx
|
SECRET=xxxxxxxxxxxxxxxx
|
||||||
#DUCKDNS_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
#DUCKDNS_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||||
#GODADDY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
#GODADDY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
|
|
|
@ -21,7 +21,7 @@ LISTEN="${LISTEN:-":80 :443"}"
|
||||||
AUTH_URL=${AUTH_URL:-"https://devices.example.com/api"}
|
AUTH_URL=${AUTH_URL:-"https://devices.example.com/api"}
|
||||||
|
|
||||||
# For Let's Encrypt / ACME challenges
|
# For Let's Encrypt / ACME challenges
|
||||||
ACME_RELAY_URL=${ACME_RELAY_URL:-"http://localhost:4200"}
|
ACME_RELAY_URL=${ACME_RELAY_URL:-"http://localhost:4200/api/dns"}
|
||||||
SECRET=${SECRET:-"xxxxxxxxxxxxxxxx"}
|
SECRET=${SECRET:-"xxxxxxxxxxxxxxxx"}
|
||||||
|
|
||||||
# For Let's Encrypt / ACME registration
|
# For Let's Encrypt / ACME registration
|
||||||
|
|
Loading…
Reference in New Issue