From 6cf948d0e155ec360474a1a12cc23c751e5e357e Mon Sep 17 00:00:00 2001 From: Arias800 Date: Sun, 30 May 2021 09:29:21 +0200 Subject: [PATCH] Return the redirected URL in the response (#126) It adds the possibility for the user to get the final url after a redirection. --- src/routes.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/routes.ts b/src/routes.ts index c71a28e59e..139065ad40 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -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.