mirror of
https://github.com/fjogeleit/http-request-action.git
synced 2024-12-27 04:22:11 -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'|
|
||||
|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 |
|
||||
|ignoreSsl| ignore ssl verify (rejectUnauthorized: false) | false |
|
||||
|
||||
### Response
|
||||
|
||||
|
|
|
@ -69,6 +69,9 @@ inputs:
|
|||
retryWait:
|
||||
description: 'wait time between retries in milliseconds'
|
||||
required: false
|
||||
ignoreSsl:
|
||||
description: 'ignore ssl verify (rejectUnauthorized: false)'
|
||||
default: 'false'
|
||||
outputs:
|
||||
response:
|
||||
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} */
|
||||
const instanceConfig = {
|
||||
httpsAgent: new https.Agent({
|
||||
rejectUnauthorized: core.getInput('ignoreSsl') !== 'true',
|
||||
}),
|
||||
baseURL: core.getInput('url', { required: true }),
|
||||
timeout: parseInt(core.getInput('timeout') || 5000, 10),
|
||||
headers: { ...headers, ...customHeaders }
|
||||
|
@ -102,4 +105,4 @@ request({ data, method, instanceConfig, files, file, actions, options }).then(re
|
|||
if (response && typeof response == 'object') {
|
||||
handler.forEach(h => h(response))
|
||||
}
|
||||
})
|
||||
})
|
Loading…
Reference in a new issue