diff --git a/README.md b/README.md index 40367e111fdefce07d4d3b755cc185fc4d04a206..ed27a6a99bc4f1dc0a0297e242d8eefd052dccdb 100644 --- a/README.md +++ b/README.md @@ -273,6 +273,24 @@ httpProxy.createServer({ }).listen(443); ``` +##### HTTP -> HTTPS (using a PKCS12 client certificate) + +```js +// +// Create an HTTP proxy server with an HTTPS target +// +httpProxy.createProxyServer({ + target: { + protocol: 'https:', + host: 'my-domain-name', + port: 443, + pfx: fs.readFileSync('path/to/certificate.p12'), + passphrase: 'password', + }, + changeOrigin: true, +}).listen(8000); +``` + **[Back to top](#table-of-contents)** #### Proxying WebSockets