Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set redirects to false for httpclient used during nip05 #920

Conversation

davotoula
Copy link
Contributor

Change OkHttpClient used for NIP05 verification to not follow redirects.

I verified that this change fails NIP05 verifications with a redirect.

After reading the OkHttpClient docs I'm comfortable this will not create unnecessary resources.

Customize Your Client With newBuilder()
You can customize a shared OkHttpClient instance with newBuilder. This builds a client that shares the same connection pool, thread pools, and configuration. Use the builder methods to add configuration to the derived client for a specific purpose.

Fix for #915

@vitorpamplona vitorpamplona merged commit 21c397b into vitorpamplona:main Jun 15, 2024
1 check passed
@vitorpamplona
Copy link
Owner

Thank you @davotoula

@davotoula davotoula deleted the 915-NIP05-verification-follows-redirects-against-specification branch July 5, 2024 09:16
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.

None yet

2 participants