Browse Source

Merge pull request #6473 from woutd/constellix-rate-limit

Add sleep before each REST call to Constellix to prevent rate limit
pull/6236/merge
neil 2 months ago
committed by GitHub
parent
commit
10627e4974
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      dnsapi/dns_constellix.sh

5
dnsapi/dns_constellix.sh

@ -117,7 +117,7 @@ dns_constellix_rm() {
#################### Private functions below ##################################
_get_root() {
domain=$1
domain=$(echo "$1" | _lower_case)
i=2
p=1
_debug "Detecting root zone"
@ -156,6 +156,9 @@ _constellix_rest() {
data="$3"
_debug "$ep"
# Prevent rate limit
_sleep 2
rdate=$(date +"%s")"000"
hmac=$(printf "%s" "$rdate" | _hmac sha1 "$(printf "%s" "$CONSTELLIX_Secret" | _hex_dump | tr -d ' ')" | _base64)

Loading…
Cancel
Save