Merge pull request #803 from beenanner/add-proxy-to-screenshot-options
WIP: Add ability to use proxy configuration for screenshots
This commit is contained in:
commit
eada5ea329
|
|
@ -11,6 +11,7 @@ var path = require('path'),
|
|||
phantomPath = require('phantomjs').path,
|
||||
slimerPath = require('slimerjs').path,
|
||||
util = require('../util/util'),
|
||||
urlParser = require('url'),
|
||||
inspect = require('util').inspect,
|
||||
fs = require('fs'),
|
||||
winston = require('winston'),
|
||||
|
|
@ -98,6 +99,12 @@ function screenshot(args, asyncDoneCallback) {
|
|||
} else {
|
||||
childArgs.push('false');
|
||||
}
|
||||
|
||||
if (config.proxy) {
|
||||
var pUrl = urlParser.parse(config.proxy);
|
||||
childArgs.push('--proxy=' + pUrl.hostname + ':' + pUrl.port)
|
||||
}
|
||||
|
||||
childArgs.push(config.waitScript);
|
||||
return childArgs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue