diff --git a/dist/index.js b/dist/index.js index b1cb924..cea6d73 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2598,6 +2598,16 @@ const core = __webpack_require__(470); const axios = __webpack_require__(53); const auth = {} +let customHeaders = {} + +if (!!core.getInput('customHeaders')) { + try { + customHeaders = JSON.parse(core.getInput('customHeaders')); + } catch(error) { + core.error('Could not parse customHeaders string value') + } +} + const headers = { 'Content-Type': core.getInput('contentType') || 'application/json' } if (!!core.getInput('username')) { @@ -2615,7 +2625,7 @@ if (!!core.getInput('bearerToken')) { const instance = axios.create({ baseURL: core.getInput('url', { required: true }), timeout: parseInt(core.getInput('timeout') || 5000, 10), - headers + headers: { ...headers, ...customHeaders } });