#!/usr/bin/env bash
# Pass 8: last-mile — 60s budget for the 3 stragglers
URLS="https://yasmanatura.co.id/ https://dmark.id/ https://surabaya-skincentre.com/ https://surabaya-skincentre.com/wp-cron.php"
echo "=== PASS8 60s $(date -u '+%H:%M:%S UTC') ==="
for U in $URLS; do
  OUT=$(curl -4 --http1.1 -sL -o /dev/null --connect-timeout 6 --max-time 60 \
        -D /tmp/ben_hdr8_$$.txt -w '%{http_code} t=%{time_total} size=%{size_download}' "$U" 2>/dev/null)
  CF=$(grep -i '^cf-cache-status' /tmp/ben_hdr8_$$.txt | tr -d '\r' | head -1)
  SRV=$(grep -i '^server:' /tmp/ben_hdr8_$$.txt | tr -d '\r' | head -1)
  echo "${U} | ${OUT} | ${CF:-no-cf-hdr} | ${SRV:-no-server}"
done
rm -f /tmp/ben_hdr8_$$.txt
echo "=== DONE $(date -u '+%H:%M:%S UTC') ==="
