Skip to content

Commit 5709b0b

Browse files
committed
fix: Fixing scw
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
1 parent e7b2f5c commit 5709b0b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

functions/scw

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ scw_allow_ip() {
66
local ZONE="${1:-fr-par-2}"
77
shift 1 || true
88

9-
http_init_client --header "X-Auth-Token: $(pass_get "dev/scaleway" "secret_key")" -4
10-
11-
http_request "https://ifconfig.me"
9+
http_init_client
10+
http_request "https://ifconfig.co/ip"
1211
if [[ ${HTTP_STATUS} != "200" ]]; then
1312
http_handle_error "Unable to get public IP"
1413
return 1
1514
fi
1615

16+
http_init_client --header "X-Auth-Token: $(pass_get "dev/scaleway" "secret_key")" -4
17+
1718
local PUBLIC_IP
1819
PUBLIC_IP="$(cat "${HTTP_OUTPUT}")"
1920

0 commit comments

Comments
 (0)