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
2021-05-30 09:29:21 +02:00
committed by GitHub
parent dcdc70273f
commit 6cf948d0e1

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.