Skip to content

Commit d2f9db8

Browse files
Radu Serbanescuindexzero
Radu Serbanescu
authored andcommitted
Add use case for proxy to HTTPS using a PKCS12 client certificate
1 parent 8231984 commit d2f9db8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,24 @@ httpProxy.createServer({
265265
}).listen(443);
266266
```
267267

268+
##### HTTP -> HTTPS (using a PKCS12 client certificate)
269+
270+
```js
271+
//
272+
// Create an HTTP proxy server with an HTTPS target
273+
//
274+
httpProxy.createProxyServer({
275+
target: {
276+
protocol: 'https:',
277+
host: 'my-domain-name',
278+
port: 443,
279+
pfx: fs.readFileSync('path/to/certificate.p12'),
280+
passphrase: 'password',
281+
},
282+
changeOrigin: true,
283+
}).listen(8000);
284+
```
285+
268286
**[Back to top](#table-of-contents)**
269287

270288
#### Proxying WebSockets

0 commit comments

Comments
 (0)