use acme relay url as true baseurl

Tento commit je obsažen v:
AJ ONeal 2020-07-17 08:16:18 +00:00
rodič 64d12ec535
revize 58dc369ce1
4 změnil soubory, kde provedl 18 přidání a 8 odebrání

Zobrazit soubor

@ -61,10 +61,15 @@ func main() {
}
endpoint := *acmeRelay
if !strings.HasSuffix(endpoint, "/") {
endpoint += "/"
}
/*
if strings.HasSuffix(endpoint, "/") {
endpoint = endpoint[:len(endpoint)-1]
}
endpoint += "/api/dns/"
*/
if provider, err = newAPIDNSProvider(endpoint, *token); nil != err {
panic(err)
}

Zobrazit soubor

@ -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")
}
endpoint := *acmeRelay
if !strings.HasSuffix(endpoint, "/") {
endpoint += "/"
}
/*
if strings.HasSuffix(endpoint, "/") {
endpoint = endpoint[:len(endpoint)-1]
}
//endpoint += "/api/dns/"
endpoint += "/api/dns/"
*/
if provider, err = newAPIDNSProvider(endpoint, *token); nil != err {
return nil, err
}

Zobrazit soubor

@ -10,7 +10,7 @@ ACME_AGREE=true
ACME_EMAIL=jon.doe@example.com
# For Let's Encrypt ACME Challenges (pick one)
ACME_RELAY_URL=http://localhost:4200
ACME_RELAY_URL=http://localhost:4200/api/dns
SECRET=xxxxxxxxxxxxxxxx
#DUCKDNS_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
#GODADDY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Zobrazit soubor

@ -21,7 +21,7 @@ LISTEN="${LISTEN:-":80 :443"}"
AUTH_URL=${AUTH_URL:-"https://devices.example.com/api"}
# 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"}
# For Let's Encrypt / ACME registration