Merge pull request #51 from t3chn0m4g3/master

Allow for screenshot within Docker
This commit is contained in:
Alicia Sykes 2023-09-12 17:37:12 +01:00 committed by GitHub
commit ad57aaa7f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,