url=https://exemplo.com.br/webhook
while redirect_url=$(
curl -I -s -S -f -w "%{redirect_url}\n" -o /dev/null "$url"
); do
echo "$url"
url=$redirect_url
[[ -z "$url" ]] && break
done
while redirect_url=$(
curl -I -s -S -f -w "%{redirect_url}\n" -o /dev/null "$url"
); do
echo "$url"
url=$redirect_url
[[ -z "$url" ]] && break
done