diff options
author | Émilien Devos <contact@emiliendevos.be> | 2020-09-07 17:03:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-07 17:03:30 +0300 |
commit | 985b31cde2f3eb02684dd558efd8806d1525330c (patch) | |
tree | 6ad1ab32c0865438dd3c94b88215c49cfe32249f /index.js | |
parent | 1da14bc23c96680a40aee55ca7b32c8bba440c73 (diff) | |
parent | 23e66f338fe8c2a0380e438743e5fc5cfc7ad859 (diff) |
Merge pull request #11 from vuori/feature/env-proxy-config
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) { |