Skip to content

Commit 10627e4

Browse files
authored
Merge pull request #6473 from woutd/constellix-rate-limit
Add sleep before each REST call to Constellix to prevent rate limit
2 parents 1b89e7c + ab22c8c commit 10627e4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dnsapi/dns_constellix.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ dns_constellix_rm() {
117117
#################### Private functions below ##################################
118118

119119
_get_root() {
120-
domain=$1
120+
domain=$(echo "$1" | _lower_case)
121121
i=2
122122
p=1
123123
_debug "Detecting root zone"
@@ -156,6 +156,9 @@ _constellix_rest() {
156156
data="$3"
157157
_debug "$ep"
158158

159+
# Prevent rate limit
160+
_sleep 2
161+
159162
rdate=$(date +"%s")"000"
160163
hmac=$(printf "%s" "$rdate" | _hmac sha1 "$(printf "%s" "$CONSTELLIX_Secret" | _hex_dump | tr -d ' ')" | _base64)
161164

0 commit comments

Comments
 (0)