Skip to content

Commit a467b7b

Browse files
committed
[examples] fixed https examples
1 parent fd42dce commit a467b7b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Diff for: examples/https-secure.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ var httpProxy = require('../lib/http-proxy'),
44
* Create your proxy server pointing to a secure domain
55
* Enable ssl validation
66
*/
7-
var options = {target : 'https://google.com',
8-
agent : https.globalAgent,
9-
headers: {host: 'google.com'}
10-
};
7+
var options = { target : 'https://google.com',
8+
agent : https.globalAgent,
9+
headers: {host: 'google.com'}
10+
};
1111

1212
var proxyServer = httpProxy.createProxyServer(options);
1313
console.log("Proxy server listening on port 8000");

Diff for: examples/https.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
var httpProxy = require('http-proxy');
1+
var httpProxy = require('../lib/http-proxy');
22
/*
33
* Create your proxy server pointing to a secure domain
44
*/
5-
var options = {target:'https://google.com'};
5+
var options = { target:'https://google.com',
6+
headers: {host: 'google.com'}
7+
};
68

79
var proxyServer = httpProxy.createProxyServer(options);
810
console.log("Proxy server listening on port 8000");

0 commit comments

Comments
 (0)