mirror of
https://github.com/fjogeleit/http-request-action.git
synced 2026-02-04 16:45:52 +08:00
Add mTLS ClientCert support
Signed-off-by: Frank Jogeleit <frank.jogeleit@lovoo.com>
This commit is contained in:
@@ -31,8 +31,12 @@ const instanceConfig = {
|
||||
headers: { ...headers, ...customHeaders }
|
||||
}
|
||||
|
||||
if (!!core.getInput('httpsCA')) {
|
||||
instanceConfig.httpsAgent = new https.Agent({ ca: core.getInput('httpsCA') })
|
||||
if (!!core.getInput('httpsCA') || !!core.getInput('httpsCert')) {
|
||||
instanceConfig.httpsAgent = new https.Agent({
|
||||
ca: core.getInput('httpsCA') || undefined,
|
||||
cert: core.getInput('httpsCert') || undefined,
|
||||
key: core.getInput('httpsKey') || undefined
|
||||
})
|
||||
}
|
||||
|
||||
if (!!core.getInput('username') || !!core.getInput('password')) {
|
||||
|
||||
Reference in New Issue
Block a user