diff options
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -20,6 +20,10 @@ const responseHeadersToRemove = ["Accept-Ranges", "Content-Length", "Keep-Alive" }; if (process.env.PUPPETEER_SKIP_CHROMIUM_DOWNLOAD) options.executablePath = '/usr/bin/chromium-browser'; + if (process.env.PUPPETEER_HEADFUL) + options.headless = false; + if (process.env.PUPPETEER_PROXY) + options.args.push(`--proxy-server=${process.env.PUPPETEER_PROXY}`); const browser = await puppeteer.launch(options); app.use(async ctx => { if (ctx.query.url) { |