diff --git a/cli.js b/cli.js index a0a8cce8..b036bfd4 100644 --- a/cli.js +++ b/cli.js @@ -288,6 +288,7 @@ const scanInit = async argvs => { argvs.browserToRun, clonedDataDir, argvs.playwrightDeviceDetailsObject, + isNewCustomFlow ); switch (res.status) { case statuses.success.code: diff --git a/constants/common.js b/constants/common.js index d24aecb3..50babdd3 100644 --- a/constants/common.js +++ b/constants/common.js @@ -256,7 +256,7 @@ export const sanitizeUrlInput = url => { return data; }; -const requestToUrl = async url => { +const requestToUrl = async (url, isNewCustomFlow) => { // User-Agent is modified to emulate a browser to handle cases where some sites ban non browser agents, resulting in a 403 error const res = {}; await axios @@ -269,15 +269,17 @@ const requestToUrl = async url => { const redirectUrl = response.request.res.responseUrl; res.status = constants.urlCheckStatuses.success.code; - if (redirectUrl != null) { - res.url = redirectUrl; - } else { - res.url = url; - } - let modifiedHTML = response.data.replace(/