Skip to content

Commit

Permalink
Accept a wider range of content types for DoH API calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarciac committed Nov 19, 2024
1 parent 2d9a2a8 commit ebe1e5a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand Down

0 comments on commit ebe1e5a

Please sign in to comment.