I cannot reach the remote server directly from my network and need to go through a proxy.
It appears request/main.js has support for proxy, but I've not managed to make it work without a patch.
One way would be to pass proxy in options, and let it specify in command line arguments, but I found it better to let request/main.js use http_proxy/https_proxy enviroment variable:
I cannot reach the remote server directly from my network and need to go through a proxy.
It appears request/main.js has support for proxy, but I've not managed to make it work without a patch.
One way would be to pass proxy in options, and let it specify in command line arguments, but I found it better to let request/main.js use http_proxy/https_proxy enviroment variable:
Index: node_modules/couchapp/node_modules/request/main.js
--- node_modules/couchapp/node_modules/request/main.js (revision 117) +++ node_modules/couchapp/node_modules/request/main.js (working copy) @@ -104,6 +104,10 @@ if (options.proxy) { if (typeof options.proxy == 'string') options.proxy = url.parse(options.proxy) }
}
options._redirectsFollowed = options._redirectsFollowed || 0 options.maxRedirects = (options.maxRedirects !== undefined) ? options.maxRedirects : 10
Hope you'll find it useful, or please let me know if there is better solution.
TODO: mention this in documentation.
Thank you.