Skip to content

Commit

Permalink
Return the redirected URL in the response (#126)
Browse files Browse the repository at this point in the history
It adds the possibility for the user to get the final url after a redirection.
  • Loading branch information
Arias800 committed May 30, 2021
1 parent dcdc702 commit 6cf948d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/routes.ts
Expand Up @@ -137,6 +137,9 @@ async function resolveChallenge(ctx: RequestContext, { url, proxy, download, ret
}
}

// Add final url in result
payload.result.url = page.url();

// make sure the page is closed because if it isn't and error will be thrown
// when a user uses a temporary session, the browser make be quit before
// the page is properly closed.
Expand Down

0 comments on commit 6cf948d

Please sign in to comment.