5166c2c4d7
This test verifies that the MCP 1.23.x DNS rebinding protection fix works correctly by sending requests with various Host headers that would be rejected if the protection were enabled. Test cases: - Kubernetes service DNS (nextcloud-mcp-server.default.svc.cluster.local:8000) - Custom domain (mcp.example.com:8000) - Proxied hostname (proxy.internal:8000) - Default localhost (localhost:8000) - Malicious hostname (evil.attacker.com:8000) Without the fix (enable_dns_rebinding_protection=False), these would fail with: - 421 Misdirected Request (Host header not in allowed list) - 403 Forbidden (Origin header not in allowed list) With the fix, all requests succeed with 200 OK (SSE format). Test results: All 2 tests passed - test_accepts_various_host_headers: PASSED - test_dns_rebinding_protection_is_disabled: PASSED