Skip to content

Commit

Permalink
fix: follow redirects when resolving lightning addresses (#155)
Browse files Browse the repository at this point in the history
* fix: follow redirects when resolving lightning addresses

* fix: follow redirects for callbacks
  • Loading branch information
reneaaron authored Oct 17, 2024
1 parent 48fee0a commit 1be9762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/lnurl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const lnurl = {
const url = normalizeLnurl(lnurlString);

try {
const response = await fetch(url.toString());
const response = await fetch(url.toString(), { redirect: "follow" });

if (!response.ok) {
throw new Error(
Expand Down Expand Up @@ -144,7 +144,7 @@ export const lnurl = {

async getPayRequest(url: string): Promise<LNURLPaymentInfo> {
try {
const response = await fetch(url.toString());
const response = await fetch(url.toString(), { redirect: "follow" });

if (!response.ok) {
throw new Error(
Expand Down

0 comments on commit 1be9762

Please sign in to comment.