From ebe1e5a1bc36a4c6172bc5d5b8f532c8c439ee9f Mon Sep 17 00:00:00 2001 From: Sergio Date: Tue, 19 Nov 2024 15:59:14 -0500 Subject: [PATCH] Accept a wider range of content types for DoH API calls. --- .../internal/handle-resolver/src/atproto-doh-handle-resolver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/internal/handle-resolver/src/atproto-doh-handle-resolver.ts b/packages/internal/handle-resolver/src/atproto-doh-handle-resolver.ts index 87b6ed639a2..07ff6b15f72 100644 --- a/packages/internal/handle-resolver/src/atproto-doh-handle-resolver.ts +++ b/packages/internal/handle-resolver/src/atproto-doh-handle-resolver.ts @@ -54,7 +54,7 @@ function dohResolveTxtFactory({ ? await response.text() : `Failed to resolve ${hostname}` throw new TypeError(message) - } else if (contentType !== 'application/dns-json') { + } else if (contentType?.match(/application\/(dns-)json/i) == null) { throw new TypeError('Unexpected response from DoH server') }