Return the redirected URL in the response (#126)

It adds the possibility for the user to get the final url after a redirection.
This commit is contained in:
Arias800 authored and GitHub committed 2021-05-30 09:29:21 +02:00
1 parent dcdc70273f
commit 6cf948d0e1
1 file changed
+3
+3
View File
@@ -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.