Thanks, Cody. Yes, this is fair enough, given that NIP-57 doesn't mention HTTP redirects. However, Alby themselves are recommending this: https://guides.getalby.com/user-guide/alby-account-and-browser-extension/alby-account/use-your-lightning-address/own-domain#:~:text=For%20advanced%20users%2C%20we%20recommend%20setting%20up%20a%20redirect%20rather%20than%20hosting%20a%20copy%20of%20your%20lightning%20address%20data

I know I'm asking a lot, but would you mind changing this line:

https://github.com/CodyTseng/jumble/blob/1c3e54c895d4a952edbc0888cab549a63cd5cbdf/src/services/lightning.service.ts#L208

To:

const res = await fetch(lnurl, { redirect: 'follow' })

If it works, I can try to chase after other client devs! 🤣

Reply to this note

Please Login to reply.

Discussion

I've tried it, but it doesn't work, haha

I think the 302 response has a CORS issue, so the browser doesn’t follow the redirect. The CORS tester makes requests from the server, so it won't be stopped by a CORS issue in the 302 response.

TIL that Cloudflare redirect rules don't play well with CORS. I've now implemented a worker with full blown CORS. Can you clear your cache and try again? (Sorry for the hassle)

It’s working fine now 👍

Thanks for all of your help Cody. Highly appreciated.

You’re welcome! Happy to help.