mirror of
https://github.com/Lissy93/web-check.git
synced 2024-11-22 08:13:59 +01:00
Allow for Screenshot within Docker
Chromium in Docker needs to be startet without sandbox or screenshot will fail.
This commit is contained in:
parent
afc5b54207
commit
2bce29e3cb
@ -21,7 +21,7 @@ const handler = async (targetUrl) => {
|
||||
let browser = null;
|
||||
try {
|
||||
browser = await puppeteer.launch({
|
||||
args: chromium.args,
|
||||
args: [...chromium.args, '--no-sandbox'], // Add --no-sandbox flag
|
||||
defaultViewport: { width: 800, height: 600 },
|
||||
executablePath: process.env.CHROME_PATH || await chromium.executablePath,
|
||||
headless: chromium.headless,
|
||||
|
Loading…
Reference in New Issue
Block a user