mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Update endpoint-status.sh
Included the -L option in the curl command, ensuring that it will follow any 301 redirects until the final URL is reached.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user