Skip to content

Commit

Permalink
Fix acmesh-official#4836 (Switch to new Gandi LiveDNS API)
Browse files Browse the repository at this point in the history
1. Updated LiveDNS API URL for the new API to allow Personal Access Tokens to work
2. Updated authorization header syntax to allow deprecated API Keys to work with the new API
  • Loading branch information
rparenton authored Jan 11, 2024
1 parent 2e58cf1 commit a48d116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dnsapi/dns_gandi_livedns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
######## Public functions #####################

GANDI_LIVEDNS_API="https://dns.api.gandi.net/api/v5"
GANDI_LIVEDNS_API="https://api.gandi.net/v5/livedns"

#Usage: dns_gandi_livedns_add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
dns_gandi_livedns_add() {
Expand Down Expand Up @@ -169,7 +169,7 @@ _gandi_livedns_rest() {
if [ -n "$GANDI_LIVEDNS_TOKEN" ]; then
export _H2="Authorization: Bearer $GANDI_LIVEDNS_TOKEN"
else
export _H2="X-Api-Key: $GANDI_LIVEDNS_KEY"
export _H2="Authorization: Apikey $GANDI_LIVEDNS_KEY"
fi

if [ "$m" = "GET" ]; then
Expand Down

0 comments on commit a48d116

Please sign in to comment.