#!/bin/bash echo "==> Debugging Caddy MIME type headers" echo "==> Testing various file types..." BASE_URL="${1:-https://ente.due.ren}" echo echo "Testing HTML files:" curl -I "$BASE_URL/" 2>/dev/null | grep -i content-type || echo "No Content-Type header found" curl -I "$BASE_URL/index.html" 2>/dev/null | grep -i content-type || echo "No Content-Type header found" echo echo "Testing JavaScript files:" curl -I "$BASE_URL/config.js" 2>/dev/null | grep -i content-type || echo "No Content-Type header found" echo echo "Testing CSS files (if any):" curl -I "$BASE_URL/styles.css" 2>/dev/null | grep -i content-type || echo "File not found or no Content-Type header" echo echo "Testing JSON files (if any):" curl -I "$BASE_URL/manifest.json" 2>/dev/null | grep -i content-type || echo "File not found or no Content-Type header" echo echo "==> Full response headers for main page:" curl -I "$BASE_URL/" 2>/dev/null || echo "Failed to connect to $BASE_URL" echo echo "==> To test from inside a container:" echo "docker exec -it curl -I http://localhost:3080/" echo echo "==> To view Caddy logs:" echo "docker exec -it tail -f /app/data/logs/caddy.log"