From 08474af4b9f66dfade81d71ec01bda5847173460 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 14 Apr 2018 22:36:53 +0200 Subject: [PATCH] fix phantom settings --- app.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index fdfc3be..7b6f1a0 100644 --- a/app.js +++ b/app.js @@ -146,7 +146,15 @@ app.get('/renderpdfview', function (req, res) { if (utils.isRefererValid(referer)) { url = req.query["url"]; if (url && utils.isValidURL(url)) { - childArgs = [config.crawlerFilePath, req.query["url"], '--ssl-protocol=any'], showImage, debugMode; + childArgs = [ + config.crawlerFilePath + , req.query["url"] + , '--local-url-access=false' + , '--ignore-ssl-errors=true' + , '--ssl-protocol=any' + , `--load-images=${showImage}` + , `--debug=${debugMode}` + ]; try { phantomProcess = childProcess.execFile(config.binPath, childArgs, { timeout: 25000 }, function (err, stdout, stderr) { utils.parsePhantomResponse(err, stdout, stderr, function (jsonResponse) {