Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
node-http-proxy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
node-http-proxy
Commits
ff829467
Commit
ff829467
authored
May 17, 2011
by
Olivier Lauzon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[minor] Fix syntax in examples/
parent
e6c52d43
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
21 deletions
+21
-21
examples/basic-proxy-https.js
examples/basic-proxy-https.js
+2
-2
examples/basic-proxy.js
examples/basic-proxy.js
+1
-1
examples/forward-proxy.js
examples/forward-proxy.js
+4
-4
examples/latent-proxy.js
examples/latent-proxy.js
+6
-6
examples/proxy-table.js
examples/proxy-table.js
+3
-3
examples/standalone-proxy.js
examples/standalone-proxy.js
+5
-5
No files found.
examples/basic-proxy-https.js
View file @
ff829467
...
@@ -46,7 +46,7 @@ https.createServer(opts, function (req, res) {
...
@@ -46,7 +46,7 @@ https.createServer(opts, function (req, res) {
// Create the proxy server listening on port 443.
// Create the proxy server listening on port 443.
//
//
httpProxy
.
createServer
(
443
,
'
localhost
'
,
{
httpProxy
.
createServer
(
443
,
'
localhost
'
,
{
https
:
opts
,
https
:
opts
}).
listen
(
8080
);
}).
listen
(
8080
);
util
.
puts
(
'
https proxy server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
8000
'
.
yellow
);
util
.
puts
(
'
https proxy server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
8000
'
.
yellow
);
...
...
examples/basic-proxy.js
View file @
ff829467
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
*/
*/
var
util
=
require
(
'
util
'
),
var
util
=
require
(
'
util
'
),
colors
=
require
(
'
colors
'
)
colors
=
require
(
'
colors
'
)
,
http
=
require
(
'
http
'
),
http
=
require
(
'
http
'
),
httpProxy
=
require
(
'
./../lib/node-http-proxy
'
);
httpProxy
=
require
(
'
./../lib/node-http-proxy
'
);
...
...
examples/forward-proxy.js
View file @
ff829467
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
*/
*/
var
util
=
require
(
'
util
'
),
var
util
=
require
(
'
util
'
),
colors
=
require
(
'
colors
'
)
colors
=
require
(
'
colors
'
)
,
http
=
require
(
'
http
'
),
http
=
require
(
'
http
'
),
httpProxy
=
require
(
'
./../lib/node-http-proxy
'
);
httpProxy
=
require
(
'
./../lib/node-http-proxy
'
);
...
@@ -52,12 +52,12 @@ http.createServer(function (req, res) {
...
@@ -52,12 +52,12 @@ http.createServer(function (req, res) {
// Target Http Forwarding Server
// Target Http Forwarding Server
//
//
http
.
createServer
(
function
(
req
,
res
)
{
http
.
createServer
(
function
(
req
,
res
)
{
util
.
puts
(
'
Receiving forward for:
'
+
req
.
url
)
util
.
puts
(
'
Receiving forward for:
'
+
req
.
url
)
;
res
.
writeHead
(
200
,
{
'
Content-Type
'
:
'
text/plain
'
});
res
.
writeHead
(
200
,
{
'
Content-Type
'
:
'
text/plain
'
});
res
.
write
(
'
request successfully forwarded to:
'
+
req
.
url
+
'
\n
'
+
JSON
.
stringify
(
req
.
headers
,
true
,
2
));
res
.
write
(
'
request successfully forwarded to:
'
+
req
.
url
+
'
\n
'
+
JSON
.
stringify
(
req
.
headers
,
true
,
2
));
res
.
end
();
res
.
end
();
}).
listen
(
9001
);
}).
listen
(
9001
);
util
.
puts
(
'
http proxy server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
8003
'
.
yellow
+
'
with forward proxy
'
.
magenta
.
underline
)
util
.
puts
(
'
http proxy server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
8003
'
.
yellow
+
'
with forward proxy
'
.
magenta
.
underline
)
;
util
.
puts
(
'
http server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
9000
'
.
yellow
);
util
.
puts
(
'
http server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
9000
'
.
yellow
);
util
.
puts
(
'
http forward server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
9001
'
.
yellow
);
util
.
puts
(
'
http forward server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
9001
'
.
yellow
);
examples/latent-proxy.js
View file @
ff829467
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
*/
*/
var
util
=
require
(
'
util
'
),
var
util
=
require
(
'
util
'
),
colors
=
require
(
'
colors
'
)
colors
=
require
(
'
colors
'
)
,
http
=
require
(
'
http
'
),
http
=
require
(
'
http
'
),
httpProxy
=
require
(
'
./../lib/node-http-proxy
'
);
httpProxy
=
require
(
'
./../lib/node-http-proxy
'
);
...
@@ -40,7 +40,7 @@ httpProxy.createServer(function (req, res, proxy) {
...
@@ -40,7 +40,7 @@ httpProxy.createServer(function (req, res, proxy) {
host
:
'
localhost
'
,
host
:
'
localhost
'
,
buffer
:
buffer
buffer
:
buffer
});
});
},
200
)
},
200
)
;
}).
listen
(
8002
);
}).
listen
(
8002
);
//
//
...
...
examples/proxy-table.js
View file @
ff829467
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
*/
*/
var
util
=
require
(
'
util
'
),
var
util
=
require
(
'
util
'
),
colors
=
require
(
'
colors
'
)
colors
=
require
(
'
colors
'
)
,
http
=
require
(
'
http
'
),
http
=
require
(
'
http
'
),
httpProxy
=
require
(
'
./../lib/node-http-proxy
'
);
httpProxy
=
require
(
'
./../lib/node-http-proxy
'
);
...
@@ -47,5 +47,5 @@ http.createServer(function (req, res) {
...
@@ -47,5 +47,5 @@ http.createServer(function (req, res) {
res
.
end
();
res
.
end
();
}).
listen
(
9000
);
}).
listen
(
9000
);
util
.
puts
(
'
http proxy server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
8001
'
.
yellow
+
'
with proxy table
'
.
magenta
.
underline
)
util
.
puts
(
'
http proxy server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
8001
'
.
yellow
+
'
with proxy table
'
.
magenta
.
underline
)
;
util
.
puts
(
'
http server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
9000
'
.
yellow
);
util
.
puts
(
'
http server
'
.
blue
+
'
started
'
.
green
.
bold
+
'
on port
'
.
blue
+
'
9000
'
.
yellow
);
examples/standalone-proxy.js
View file @
ff829467
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
*/
*/
var
util
=
require
(
'
util
'
),
var
util
=
require
(
'
util
'
),
colors
=
require
(
'
colors
'
)
colors
=
require
(
'
colors
'
)
,
http
=
require
(
'
http
'
),
http
=
require
(
'
http
'
),
httpProxy
=
require
(
'
./../lib/node-http-proxy
'
);
httpProxy
=
require
(
'
./../lib/node-http-proxy
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment