Daily CORS error reminder.

https://void.cat/d/EDUMSoSP33hX1YHpkHCstv.webp

Reply to this note

Please Login to reply.

Discussion

Bitcoin doea not fix CORS for you.

Maybe clients should give an error on this if people put in a NIP-05 address with incorrectly configured CORS, even if the client doesn't need the CORS header themselves.

Or web clients shouldn't be calling out to those URLs, but leave it to a back-end.

I have my client setup to show a visual warning if it can't get the NIP-05. And I've seen a lot of people who don't have CORS setup.

CORS has been nothing but a pain for me when writing JavaScript. And its annoying became native apps don't have to pay attention to CORS. Its only JavaScript that has too. I don't really know a good solution though. All I can do is complain.

Your client is React, isn't it? Let the backend resolve the NIP-05 file.

I tried your client, but it didn't want to connect to relays. Do I need to do something to get it going? I added a few relays, but no dice.

yes its React which means I dont have a backend. One thing I think might work is to run something like https://github.com/Rob--W/cors-anywhere which is a http proxy that overrides the CORS headers.

As for the client not connecting to relays. the client is doing two things when you login.

1. It asks for a bootstrap relay which is used to fetch your relay list (10002)

2. Once it finds your relay list it saves it and connect to the realys

If you logged in with an extension it probably didn't provide any bootstrap relays. and so the client didn't know where to look for the relay list.

I probably need to update it to have a default bootstrap list if the user dose not provide it.

Thanks for giving the client a try, Its still a work in progress so I would caution using it too much since Id hate for it to accidentally override your relay list.

Tag these bitches.

#[2] #[3]

#[4]

Maybe I'll write a bot.

I changed a config on my web server yesterday, will take a look.