first commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
module.exports = (puppeteer) => {
|
||||
return async (req, res, next) => {
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath: '/usr/bin/google-chrome',
|
||||
args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-gpu'],
|
||||
ignoreDefaultArgs: ['--disable-extensions'],
|
||||
headless: 'new'
|
||||
});
|
||||
|
||||
req.browser = browser;
|
||||
next();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user