Open mlucool opened 5 years ago
@pavelfeldman any thoughts on this?
I don't think users should be able to pass arbitrary / raw flags to Chrome that is running the Carlo app. Carlo is just a framework and if the app wants to expose this capability, it can read the environment and pass corresponding arguments into Carlo. What kind of flags did you have in mind though? There might be some that would make sense to control on a generic Carlo framework level, I am just struggling coming up with a good example.
For ndb to work in my setup, I need to not only pass the location of my chrome path, but also set a few flags in args:
--disable-setuid-sandbox --no-sandbox --auth-server-whitelist='*.myurl.com'
I also tend to pass: ignoreHTTPSErrors: true
for puppeteer in general, but this is unlikely needed here.
@pavelfeldman Is this something you think should go into ndb
?
Hi,
Carlo is used by programs like ndb. It currently allows for chrome to be set via CHROME_PATH, but it does not allow for any way to pass other options to the launched chrome via environment variables. While all options may be a good idea, the one I care the most about is being able to pass
args
.I am happy to implement this this feature by adding another environment variable
CARLO_OPTIONS
and doing a merge of the passed options andJSON.parse(process.env.CARLO_OPTIONS)
here: https://github.com/GoogleChromeLabs/carlo/blob/master/lib/carlo.js#L589.What do you think?