summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.js b/index.js
index 75fe2ec..90123ac 100644
--- a/index.js
+++ b/index.js
@@ -15,9 +15,9 @@ const app = new Koa();
app.use(async ctx => {
if (ctx.query.url) {
const page = await browser.newPage();
- await page.goto(ctx.query.url);
+ await page.goto(ctx.query.url, {timeout: 30000, waitUntil: 'domcontentloaded'});
if ((await page.content()).includes("cf-browser-verification"))
- await page.waitForNavigation();
+ await page.waitForNavigation({timeout: 30000, waitUntil: 'domcontentloaded'});
ctx.body = await page.content();
await page.close();
}