Skip to content

Correct trusted DoH resolver contracts - #524

Merged
moelayyan90 merged 1 commit into
mainfrom
fix/production-doh-resolution
Sep 1, 2026
Merged

Correct trusted DoH resolver contracts#524
moelayyan90 merged 1 commit into
mainfrom
fix/production-doh-resolution

Conversation

@moelayyan90

Copy link
Copy Markdown
Owner

Production deployment 0155727 reached the exact tagged Worker and failed only at POST /v1/pricing/quote with HTTP 422 dns_unresolved.

Root cause: the fallback used Cloudflare's application/dns-json MIME type for Google's JSON endpoint and rejected trusted redirects; both resolvers returned immediately without a usable response.

This fix:

  • uses resolver-specific MIME contracts;
  • adds Cloudflare's documented one.one.one.one JSON endpoint;
  • follows redirects only when the final host remains in the resolver's trust set;
  • queries trusted resolvers concurrently;
  • still requires successful A and AAAA resolution and rejects any private answer;
  • records the quote probe's HTTP status and stable error code without leaking signed payloads.

Focused behavior tests: 19/19 passing, including resolver fallback, SSRF blocks, settlement-before-execution, replay, MCP and version metadata.

@moelayyan90
moelayyan90 merged commit 57f2a3b into main Sep 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant