#!/bin/bash
# فحص وصول الدومين والسيرفر المحلي
echo "=== 1. السيرفر المحلي (يفترض أن يعمل) ==="
curl -s -o /dev/null -w "HTTP %{http_code}\n" http://127.0.0.1:8000/api/hello

echo ""
echo "=== 2. الدومين (من السيرفر نفسه) ==="
curl -s -o /dev/null -w "HTTP %{http_code}\n" https://test.legalsure.ai/api/hello 2>/dev/null || echo "فشل الاتصال"

echo ""
echo "=== 3. محتوى الاستجابة من الدومين ==="
curl -s https://test.legalsure.ai/api/hello 2>/dev/null | head -c 300
echo ""
