From 91a6406a208c8439c3041507399e944a10207f56 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 5 Dec 2020 21:15:38 -0300 Subject: [PATCH] proxy LNURL requests through cors-anywhere I don't know if this is going to work. --- src/utils/invoices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/invoices.js b/src/utils/invoices.js index 9692fe8..f00bd16 100644 --- a/src/utils/invoices.js +++ b/src/utils/invoices.js @@ -50,7 +50,7 @@ const handleLNURL = (invoice: string) => { const decodedLNURL = bech32.decode(invoice, 1500); const url = Buffer.from(bech32.fromWords(decodedLNURL.words)).toString(); - return axios.get(url, { + return axios.get('https://cors-anywhere.herokuapp.com/' + url, { headers: { 'Access-Control-Allow-Origin': '*', }