Skip to content

Commit

Permalink
Merge pull request #38 from fiatjaf/patch-1
Browse files Browse the repository at this point in the history
proxy LNURL requests through cors-anywhere
  • Loading branch information
andrerfneves authored Jan 14, 2021
2 parents 05e7762 + 91a6406 commit 0fd4bdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/invoices.js
Original file line number Diff line number Diff line change
Expand Up @@ -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': '*',
}
Expand Down

1 comment on commit 0fd4bdc

@vercel
Copy link

@vercel vercel bot commented on 0fd4bdc Jan 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.