File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,7 @@ Here we list them all with their purpose.
311311* ` LOGSTASH_HOST = undefined ` - host address of the logstash
312312* ` LOGSTASH_PORT = undefined ` - port of the logstash server
313313* ` HEADLESS = true ` - should the service use the "headless" mode
314+ * ` ACCEPT_INSECURE_CERTS = false ` - should the service allow navigation on sites with insecure certificate
314315* ` CONNECT_TIMEOUT = 180000 ` - Maximum time in milliseconds to wait for the browser to start
315316* ` VIEWPORT_WIDTH = 1280 ` - width of the browser's window
316317* ` VIEWPORT_HEIGHT = 720 ` - height of the browser's window
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ const LOG_FILE = process.env.LOG_FILE;
3737const LOGSTASH_HOST = process . env . LOGSTASH_HOST ;
3838const LOGSTASH_PORT = process . env . LOGSTASH_PORT ;
3939const HEADLESS = ( process . env . HEADLESS || "true" ) . toLowerCase ( ) === "true" ;
40+ const ACCEPT_INSECURE_CERTS = ( process . env . ACCEPT_INSECURE_CERTS || "false" ) . toLowerCase ( ) === "true" ;
4041const CONNECT_TIMEOUT = parseInt ( process . env . CONNECT_TIMEOUT ) || 180000 ;
4142const VIEWPORT_WIDTH = parseInt ( process . env . VIEWPORT_WIDTH ) || 1280 ;
4243const VIEWPORT_HEIGHT = parseInt ( process . env . VIEWPORT_HEIGHT ) || 720 ;
@@ -75,6 +76,7 @@ async function setupBrowser() {
7576 //TODO add more params for puppeteer launch
7677 const browser = await puppeteer . launch (
7778 {
79+ acceptInsecureCerts : ACCEPT_INSECURE_CERTS ,
7880 headless : HEADLESS ,
7981 defaultViewport : { width : VIEWPORT_WIDTH , height : VIEWPORT_HEIGHT } ,
8082 timeout : CONNECT_TIMEOUT ,
Original file line number Diff line number Diff line change 11{
22 "name" : " scrapy-puppeteer-service" ,
3- "version" : " 0.3.12 " ,
3+ "version" : " 0.3.13 " ,
44 "private" : true ,
55 "scripts" : {
66 "start" : " node ./bin/www"
You can’t perform that action at this time.
0 commit comments