mirror of
https://github.com/fjogeleit/http-request-action.git
synced 2024-11-25 13:20:56 -05:00
Add ignore ssl error (#145)
* add ignore ssl * build and update docs * keep the upstream formatting/indentation
This commit is contained in:
parent
8af2803109
commit
ed8a1c36db
4 changed files with 565 additions and 554 deletions
|
@ -48,6 +48,7 @@ jobs:
|
||||||
|maskResponse| If set to true, the response will be masked in the logs of the action |'false'|
|
|maskResponse| If set to true, the response will be masked in the logs of the action |'false'|
|
||||||
|retry| optional amount of retries if the request is failing, does not retry if the status code is ignored ||
|
|retry| optional amount of retries if the request is failing, does not retry if the status code is ignored ||
|
||||||
|retryWait| time between each retry in millseconds | 3000 |
|
|retryWait| time between each retry in millseconds | 3000 |
|
||||||
|
|ignoreSsl| ignore ssl verify (rejectUnauthorized: false) | false |
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,9 @@ inputs:
|
||||||
retryWait:
|
retryWait:
|
||||||
description: 'wait time between retries in milliseconds'
|
description: 'wait time between retries in milliseconds'
|
||||||
required: false
|
required: false
|
||||||
|
ignoreSsl:
|
||||||
|
description: 'ignore ssl verify (rejectUnauthorized: false)'
|
||||||
|
default: 'false'
|
||||||
outputs:
|
outputs:
|
||||||
response:
|
response:
|
||||||
description: 'HTTP Response Content'
|
description: 'HTTP Response Content'
|
||||||
|
|
1110
dist/index.js
vendored
1110
dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -29,6 +29,9 @@ if (!!core.getInput('bearerToken')) {
|
||||||
|
|
||||||
/** @type {axios.AxiosRequestConfig} */
|
/** @type {axios.AxiosRequestConfig} */
|
||||||
const instanceConfig = {
|
const instanceConfig = {
|
||||||
|
httpsAgent: new https.Agent({
|
||||||
|
rejectUnauthorized: core.getInput('ignoreSsl') !== 'true',
|
||||||
|
}),
|
||||||
baseURL: core.getInput('url', { required: true }),
|
baseURL: core.getInput('url', { required: true }),
|
||||||
timeout: parseInt(core.getInput('timeout') || 5000, 10),
|
timeout: parseInt(core.getInput('timeout') || 5000, 10),
|
||||||
headers: { ...headers, ...customHeaders }
|
headers: { ...headers, ...customHeaders }
|
||||||
|
|
Loading…
Reference in a new issue