Add ignore ssl error (#145)

* add ignore ssl
* build and update docs
* keep the upstream formatting/indentation
This commit is contained in:
Kittizz
2024-04-20 19:34:12 +07:00
committed by GitHub
parent 8af2803109
commit ed8a1c36db
4 changed files with 565 additions and 554 deletions

View File

@@ -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))
}
})
})