Proxy with client certificates
Created by: javierpavon2000
I'm trying to perform a proxy to an url that needs a client certificate. The context is:
- I've installed a p12 file in the browser and after that I can access to the endpoint https://aaa.com/webservice:4278
- I've extracted the key and the certificate of the p12 file installed in the browser
Now, I've defined an object like that
var objConf = { target: 'https://aaa.com/webservice:4278',
secure: false,
headers: { host: 'scytl-sessmgm.cloudapp.net:4278' },
ssl:
{ key: '-----BEGIN RSA PRIVATE KEY----- ..... -----END RSA PRIVATE KEY-----',
cert: '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----'
}
}
and the, I create the proxy
var proxy = httpProxy.createProxyServer(objConf);
But, it doesn't work, the request always returns a 403 status code.
Am I doing something wrong? Any help? Thanks