Skip to content

Commit

Permalink
fix phantom settings
Browse files Browse the repository at this point in the history
  • Loading branch information
micmro committed Apr 14, 2018
1 parent efd3be1 commit 08474af
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 08474af

Please sign in to comment.