Skip to content

Commit

Permalink
Merge pull request OneUptime#1498 from jackveney/patch-1
Browse files Browse the repository at this point in the history
Update endpoint-status.sh to follow redirects
  • Loading branch information
simlarsen authored Jun 20, 2024
2 parents 01a1a0f + 17a0b65 commit ef3fe66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/Scripts/endpoint-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ http_status=0

# Loop until either the endpoint returns 200 or the maximum retries are reached
while [ $retries -lt $max_retries ]; do
# Make a curl request and capture the HTTP status code
http_status=$(curl -s -o /dev/null -w "%{http_code}" $endpoint_url)
# Make a curl request and capture the HTTP status code, following redirects
http_status=$(curl -s -o /dev/null -w "%{http_code}" -L $endpoint_url)

# Check if the HTTP status code is 200 (OK)
if [ $http_status -eq 200 ]; then
Expand Down

0 comments on commit ef3fe66

Please sign in to comment.