refactor: clean repository structure for v0.1.0 open source release
- Remove Go artifacts (cmd/, internal/, pkg/, go.mod) - Move furt-lua/* content to repository root - Restructure as clean src/, config/, scripts/, tests/ layout - Rewrite README.md as practical tool documentation - Remove timeline references and marketing language - Clean .gitignore from Go-era artifacts - Update config/server.lua with example.org defaults - Add .env.production to .gitignore for security Repository now ready for open source distribution with minimal, focused structure and generic configuration templates. close issue DAW/furt#86
This commit is contained in:
parent
87c935379b
commit
be3b9614d0
38 changed files with 280 additions and 5892 deletions
80
scripts/production_test_sequence.sh
Normal file
80
scripts/production_test_sequence.sh
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
#!/bin/bash
|
||||
# Production Test für api.dragons-at-work.de
|
||||
|
||||
echo "Testing Production API via Apache Proxy"
|
||||
echo "======================================="
|
||||
|
||||
# Test 1: HTTPS Health Check
|
||||
echo ""
|
||||
echo "[1] Testing HTTPS Health Check..."
|
||||
https_health=$(curl -s https://api.dragons-at-work.de/health)
|
||||
echo "HTTPS Response: $https_health"
|
||||
|
||||
if echo "$https_health" | grep -q "healthy"; then
|
||||
echo "[OK] HTTPS Proxy working"
|
||||
else
|
||||
echo "[ERROR] HTTPS Proxy failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Test 2: SMTP Status via HTTPS
|
||||
echo ""
|
||||
echo "[2] Testing SMTP Configuration via HTTPS..."
|
||||
if echo "$https_health" | grep -q '"smtp_configured":true'; then
|
||||
echo "[OK] SMTP configured and accessible via HTTPS"
|
||||
else
|
||||
echo "[ERROR] SMTP not configured or not accessible"
|
||||
fi
|
||||
|
||||
# Test 3: CORS Headers
|
||||
echo ""
|
||||
echo "[3] Testing CORS Headers..."
|
||||
cors_test=$(curl -s -I https://api.dragons-at-work.de/health | grep -i "access-control")
|
||||
if [ -n "$cors_test" ]; then
|
||||
echo "[OK] CORS headers present: $cors_test"
|
||||
else
|
||||
echo "[WARN] CORS headers missing - add to Apache config"
|
||||
fi
|
||||
|
||||
# Test 4: Production Mail Test
|
||||
echo ""
|
||||
echo "[4] Testing Production Mail via HTTPS..."
|
||||
echo "WARNING: This sends real email via production API"
|
||||
read -p "Continue with production mail test? (y/N): " -n 1 -r
|
||||
echo
|
||||
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Sending production test email..."
|
||||
|
||||
prod_mail_response=$(curl -s -X POST https://api.dragons-at-work.de/v1/mail/send \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"name": "Production Test",
|
||||
"email": "test@dragons-at-work.de",
|
||||
"subject": "Production API Test - Apache Proxy Success!",
|
||||
"message": "This email was sent via the production API at api.dragons-at-work.de through Apache proxy to Furt-Lua backend. HTTPS integration working!"
|
||||
}')
|
||||
|
||||
echo "Production Response: $prod_mail_response"
|
||||
|
||||
if echo "$prod_mail_response" | grep -q '"success":true'; then
|
||||
echo "[OK] PRODUCTION MAIL SENT VIA HTTPS!"
|
||||
echo "Check admin@dragons-at-work.de for delivery confirmation"
|
||||
else
|
||||
echo "[ERROR] Production mail failed"
|
||||
fi
|
||||
else
|
||||
echo "Skipping production mail test"
|
||||
fi
|
||||
|
||||
# Test 5: Security Headers
|
||||
echo ""
|
||||
echo "[5] Testing Security Headers..."
|
||||
security_headers=$(curl -s -I https://api.dragons-at-work.de/health)
|
||||
echo "Security Headers:"
|
||||
echo "$security_headers" | grep -i "x-content-type-options\|x-frame-options\|strict-transport"
|
||||
|
||||
echo ""
|
||||
echo "Production Test Complete!"
|
||||
echo "========================"
|
||||
echo "Next: Hugo integration with https://api.dragons-at-work.de/v1/mail/send"
|
||||
Loading…
Add table
Add a link
Reference in a new issue