GoogleChromeLabs / carlo

Web rendering surface for Node applications
Apache License 2.0
9.31k stars 309 forks source link

Correct way to disable devtool access? #130

Open gadamsgh opened 5 years ago

gadamsgh commented 5 years ago

I'd like to disable access to devtools for certain cases. I found that passing the "--devtools-flags" flag as a launch arg prevents opening devtools via F12, right click -> inspect element, and ctrl+shft+I. Is this the correct way to disable devtool access?

Example main.js:

const carlo = require('carlo');

(async () => {
    const app = await carlo.launch({args:['--devtools-flags']});
    app.on('exit', () => process.exit());
    app.serveFolder(__dirname);
    await app.load('https://www.google.com');
})();
pavelfeldman commented 5 years ago

There is no good way of disabling devtools via Carlo atm.