Google Safe Browsing
shows client side warning page when browsing to a malicious web site.
For example, navigating to https://testsafebrowsing.appspot.com/s/malware.html will display:
However, when using puppeteer
this warning page is not shown.
Is it possible to enable this error screen in puppeteer, or to detect it will be shown if using the browser?
I have tried to:
Chrome
instead of Chromium
ignoreDefaultArgs
to true (run without puppeteer default flags): const browser = await puppeteer.launch({
executablePath: '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome',
ignoreDefaultArgs: true,
});
However the warning page was never displayed.
Did you try launching puppeteer with the 'userDataDir' argument? Using a predefined user directory should enable web security capabilities.
const browser = await puppeteer.launch({
executablePath: '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome',
ignoreDefaultArgs: true,
userDataDir: '/Users/<user>/Library/Application Support/Google/Chrome'
});