curl follow redirects

This commit is contained in:
Carlos Polop 2024-09-19 11:57:19 +02:00
parent 7979c470a1
commit cb39091bfa
8 changed files with 8 additions and 8 deletions

View File

@ -26,7 +26,7 @@ if [ "$is_ibm_vm" = "Yes" ]; then
ibm_req=""
if [ "$(command -v curl || echo -n '')" ]; then
ibm_req="curl -s -f -H '$TOKEN_HEADER' -H '$ACCEPT_HEADER'"
ibm_req="curl -s -f -L -H '$TOKEN_HEADER' -H '$ACCEPT_HEADER'"
elif [ "$(command -v wget || echo -n '')" ]; then
ibm_req="wget -q -O - -H '$TOKEN_HEADER' -H '$ACCEPT_HEADER'"
else

View File

@ -19,7 +19,7 @@ if [ "$is_aliyun_ecs" = "Yes" ]; then
aliyun_token=""
if [ "$(command -v curl)" ]; then
aliyun_token=$(curl -X PUT "http://100.100.100.200/latest/api/token" -H "X-aliyun-ecs-metadata-token-ttl-seconds:1000")
aliyun_req='curl -s -f -H "X-aliyun-ecs-metadata-token: $aliyun_token"'
aliyun_req='curl -s -f -L -H "X-aliyun-ecs-metadata-token: $aliyun_token"'
elif [ "$(command -v wget)" ]; then
aliyun_token=$(wget -q -O - --method PUT "http://100.100.100.200/latest/api/token" --header "X-aliyun-ecs-metadata-token-ttl-seconds:1000")
aliyun_req='wget -q -O --header "X-aliyun-ecs-metadata-token: $aliyun_token"'

View File

@ -21,7 +21,7 @@ if [ "$is_aws_ec2" = "Yes" ]; then
aws_req=""
if [ "$(command -v curl || echo -n '')" ]; then
aws_req="curl -s -f -H '$HEADER'"
aws_req="curl -s -f -L -H '$HEADER'"
elif [ "$(command -v wget || echo -n '')" ]; then
aws_req="wget -q -O - -H '$HEADER'"
else

View File

@ -16,7 +16,7 @@
if [ "$is_gcp_function" = "Yes" ]; then
gcp_req=""
if [ "$(command -v curl)" ]; then
gcp_req='curl -s -f -H "Metadata-Flavor: Google"'
gcp_req='curl -s -f -L -H "Metadata-Flavor: Google"'
elif [ "$(command -v wget)" ]; then
gcp_req='wget -q -O - --header "Metadata-Flavor: Google"'
else

View File

@ -16,7 +16,7 @@
if [ "$is_gcp_vm" = "Yes" ]; then
gcp_req=""
if [ "$(command -v curl || echo -n '')" ]; then
gcp_req='curl -s -f -H "Metadata-Flavor: Google"'
gcp_req='curl -s -f -L -H "Metadata-Flavor: Google"'
elif [ "$(command -v wget || echo -n '')" ]; then
gcp_req='wget -q -O - --header "Metadata-Flavor: Google"'
else

View File

@ -22,7 +22,7 @@ if [ "$is_az_vm" = "Yes" ]; then
az_req=""
if [ "$(command -v curl || echo -n '')" ]; then
az_req="curl -s -f -H '$HEADER'"
az_req="curl -s -f -L -H '$HEADER'"
elif [ "$(command -v wget || echo -n '')" ]; then
az_req="wget -q -O - -H '$HEADER'"
else

View File

@ -23,7 +23,7 @@ if [ "$is_az_app" = "Yes" ]; then
az_req=""
if [ "$(command -v curl || echo -n '')" ]; then
az_req="curl -s -f -H '$HEADER'"
az_req="curl -s -f -L -H '$HEADER'"
elif [ "$(command -v wget || echo -n '')" ]; then
az_req="wget -q -O - -H '$HEADER'"
else

View File

@ -18,7 +18,7 @@ if [ "$is_do" = "Yes" ]; then
do_req=""
if [ "$(command -v curl || echo -n '')" ]; then
do_req='curl -s -f '
do_req='curl -s -f -L '
elif [ "$(command -v wget || echo -n '')" ]; then
do_req='wget -q -O - '
else