We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7b2f5c commit 5709b0bCopy full SHA for 5709b0b
1 file changed
functions/scw
@@ -6,14 +6,15 @@ scw_allow_ip() {
6
local ZONE="${1:-fr-par-2}"
7
shift 1 || true
8
9
- http_init_client --header "X-Auth-Token: $(pass_get "dev/scaleway" "secret_key")" -4
10
-
11
- http_request "https://ifconfig.me"
+ http_init_client
+ http_request "https://ifconfig.co/ip"
12
if [[ ${HTTP_STATUS} != "200" ]]; then
13
http_handle_error "Unable to get public IP"
14
return 1
15
fi
16
+ http_init_client --header "X-Auth-Token: $(pass_get "dev/scaleway" "secret_key")" -4
17
+
18
local PUBLIC_IP
19
PUBLIC_IP="$(cat "${HTTP_OUTPUT}")"
20
0 commit comments