Set redirects to false for httpclient used during nip05

This commit is contained in:
David Kaspar 2024-06-15 09:51:05 +02:00
parent 035affadb9
commit 29a002e451

View File

@ -64,8 +64,8 @@ class Nip05NostrAddressVerifier() {
.header("User-Agent", "Amethyst/${BuildConfig.VERSION_NAME}") .header("User-Agent", "Amethyst/${BuildConfig.VERSION_NAME}")
.url(url) .url(url)
.build() .build()
// Fetchers MUST ignore any HTTP redirects given by the /.well-known/nostr.json endpoint.
HttpClientManager.getHttpClient() HttpClientManager.getHttpClient().newBuilder().followRedirects(false).build()
.newCall(request) .newCall(request)
.enqueue( .enqueue(
object : Callback { object : Callback {