Skip to content

Commit

Permalink
ignoreProxy for axios request
Browse files Browse the repository at this point in the history
handle `proxy` system when `http_proxy` variables are set.
axios/axios#1514 (comment)

set `proxy: false` for axios config to handle proxy enabled systems
  • Loading branch information
kspramod authored and jeffbski committed Jul 9, 2020
1 parent 838e471 commit 4e58a26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/wait-on.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const WAIT_ON_SCHEMA = Joi.object({
password: Joi.string(),
}),
strictSSL: Joi.boolean().default(false),
ignoreProxy: Joi.boolean().default(false),
followRedirect: Joi.boolean().default(true), // HTTP 3XX responses
headers: Joi.object(),
});
Expand Down Expand Up @@ -267,6 +268,7 @@ function createHTTP$({ validatedOpts, output }, resource) {
reverse,
simultaneous,
strictSSL: rejectUnauthorized,
ignoreProxy,
} = validatedOpts;
const method = HTTP_GET_RE.test(resource) ? 'get' : 'head';
const url = resource.replace('-get:', ':');
Expand All @@ -284,6 +286,7 @@ function createHTTP$({ validatedOpts, output }, resource) {
...(followRedirect ? {} : { maxRedirects: 0 }), // defaults to 5 (enabled)
...(timeout && { timeout }),
...urlSocketOptions,
...(ignoreProxy ? { proxy: false }: {}), // axios no proxy
method,
// by default it provides full response object
// validStatus is 2xx unless followRedirect is true (default)
Expand Down

0 comments on commit 4e58a26

Please sign in to comment.