Skip to content

Commit

Permalink
[dist] Update LICENSE to reflect 2015 changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Mar 12, 2016
1 parent 0183529 commit f345a1a
Show file tree
Hide file tree
Showing 24 changed files with 52 additions and 54 deletions.
4 changes: 2 additions & 2 deletions LICENSE
@@ -1,7 +1,7 @@

node-http-proxy

Copyright (c) Nodejitsu 2013
Copyright (c) 2010-2016 Charlie Robbins, Jarrett Cruger & the Contributors.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand All @@ -20,4 +20,4 @@
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -333,14 +333,14 @@ proxyServer.listen(8015);
* **ignorePath**: true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request (note: you will have to append / manually if required).
* **localAddress**: Local interface string to bind for outgoing connections
* **changeOrigin**: true/false, Default: false - changes the origin of the host header to the target URL
* **auth**: Basic authentication i.e. 'user:password' to compute an Authorization header.
* **auth**: Basic authentication i.e. 'user:password' to compute an Authorization header.
* **hostRewrite**: rewrites the location hostname on (301/302/307/308) redirects.
* **autoRewrite**: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false.
* **protocolRewrite**: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.
* **headers**: object with extra headers to be added to target requests.

**NOTE:**
`options.ws` and `options.ssl` are optional.
**NOTE:**
`options.ws` and `options.ssl` are optional.
`options.target` and `options.forward` cannot both be missing

If you are using the `proxyServer.listen` method, the following options are also applicable:
Expand Down Expand Up @@ -458,7 +458,7 @@ Logo created by [Diego Pasquali](http://dribbble.com/diegopq)

>The MIT License (MIT)
>
>Copyright (c) 2010 - 2016 Nodejitsu Inc.
>Copyright (c) 2010 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
>
>Permission is hereby granted, free of charge, to any person obtaining a copy
>of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 7 additions & 8 deletions examples/balancer/simple-balancer-with-websockets.js
@@ -1,7 +1,7 @@
/*
simple-balancer.js: Example of a simple round robin balancer for websockets
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -29,7 +29,7 @@ var http = require('http'),

//
// A simple round-robin load balancing strategy.
//
//
// First, list the servers you want to use in your rotation.
//
var addresses = [
Expand Down Expand Up @@ -64,21 +64,20 @@ function nextProxy() {
return proxy;
}

//
// Get the 'next' proxy and send the http request
//
// Get the 'next' proxy and send the http request
//

var server = http.createServer(function (req, res) {
var server = http.createServer(function (req, res) {
nextProxy().web(req, res);
});

//
// Get the 'next' proxy and send the upgrade request
//
// Get the 'next' proxy and send the upgrade request
//

server.on('upgrade', function (req, socket, head) {
nextProxy().ws(req, socket, head);
});

server.listen(8001);

4 changes: 2 additions & 2 deletions examples/balancer/simple-balancer.js
@@ -1,7 +1,7 @@
/*
simple-balancer.js: Example of a simple round robin balancer
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand All @@ -28,7 +28,7 @@ var http = require('http'),
httpProxy = require('../../lib/http-proxy');
//
// A simple round-robin load balancing strategy.
//
//
// First, list the servers you want to use in your rotation.
//
var addresses = [
Expand Down
10 changes: 5 additions & 5 deletions examples/http/basic-proxy.js
@@ -1,7 +1,7 @@
/*
basic-proxy.js: Basic example of proxying over HTTP
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -31,10 +31,10 @@ var util = require('util'),

var welcome = [
'# # ##### ##### ##### ##### ##### #### # # # #',
'# # # # # # # # # # # # # # # # ',
'###### # # # # ##### # # # # # # ## # ',
'# # # # ##### ##### ##### # # ## # ',
'# # # # # # # # # # # # # ',
'# # # # # # # # # # # # # # # # ',
'###### # # # # ##### # # # # # # ## # ',
'# # # # ##### ##### ##### # # ## # ',
'# # # # # # # # # # # # # ',
'# # # # # # # # #### # # # '
].join('\n');

Expand Down
8 changes: 4 additions & 4 deletions examples/http/concurrent-proxy.js
@@ -1,7 +1,7 @@
/*
concurrent-proxy.js: check levelof concurrency through proxy.
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -44,7 +44,7 @@ httpProxy.createServer({
//


var connections = [],
var connections = [],
go;

http.createServer(function (req, res) {
Expand All @@ -53,9 +53,9 @@ http.createServer(function (req, res) {
res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2));
res.end();
});

process.stdout.write(connections.length + ', ');

if (connections.length > 110 || go) {
go = true;
while (connections.length) {
Expand Down
4 changes: 2 additions & 2 deletions examples/http/custom-proxy-error.js
@@ -1,7 +1,7 @@
/*
custom-proxy-error.js: Example of using the custom `proxyError` event.
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -47,7 +47,7 @@ proxy.on('error', function (err, req, res) {
res.writeHead(500, {
'Content-Type': 'text/plain'
});

res.end('Something went wrong. And we are reporting a custom error message.');
});

Expand Down
2 changes: 1 addition & 1 deletion examples/http/error-handling.js
@@ -1,7 +1,7 @@
/*
error-handling.js: Example of handle erros for HTTP and WebSockets
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion examples/http/forward-and-target-proxy.js
@@ -1,7 +1,7 @@
/*
forward-and-target-proxy.js: Example of proxying over HTTP with additional forward proxy
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion examples/http/forward-proxy.js
@@ -1,7 +1,7 @@
/*
forward-proxy.js: Example of proxying over HTTP with additional forward proxy
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion examples/http/latent-proxy.js
@@ -1,7 +1,7 @@
/*
latent-proxy.js: Example of proxying over HTTP with latency
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion examples/http/proxy-http-to-https.js
@@ -1,7 +1,7 @@
/*
proxy-http-to-https.js: Basic example of proxying over HTTP to a target HTTPS server
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
6 changes: 3 additions & 3 deletions examples/http/proxy-https-to-http.js
@@ -1,7 +1,7 @@
/*
proxy-https-to-http.js: Basic example of proxying over HTTPS to a target HTTP server
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -32,9 +32,9 @@ var https = require('https'),
colors = require('colors'),
httpProxy = require('../../lib/http-proxy'),
fixturesDir = path.join(__dirname, '..', '..', 'test', 'fixtures');

//
// Create the target HTTP server
// Create the target HTTP server
//
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
Expand Down
6 changes: 3 additions & 3 deletions examples/http/proxy-https-to-https.js
@@ -1,7 +1,7 @@
/*
proxy-https-to-https.js: Basic example of proxying over HTTPS to a target HTTPS server
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -36,9 +36,9 @@ var https = require('https'),
key: fs.readFileSync(path.join(fixturesDir, 'agent2-key.pem'), 'utf8'),
cert: fs.readFileSync(path.join(fixturesDir, 'agent2-cert.pem'), 'utf8')
};

//
// Create the target HTTPS server
// Create the target HTTPS server
//
https.createServer(httpsOpts, function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
Expand Down
4 changes: 2 additions & 2 deletions examples/http/sse.js
@@ -1,7 +1,7 @@
/*
sse.js: Basic example of proxying over HTTP
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -50,7 +50,7 @@ var server = http.createServer(function(req, res) {
});

//
// Use SSE
// Use SSE
//

var sse = new SSE(server, {path: '/'});
Expand Down
2 changes: 1 addition & 1 deletion examples/http/standalone-proxy.js
@@ -1,7 +1,7 @@
/*
standalone-proxy.js: Example of proxying over HTTP with a standalone HTTP server.
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/bodyDecoder-middleware.js
@@ -1,7 +1,7 @@
/*
bodyDecoder-middleware.js: Basic example of `connect.bodyParser()` middleware in node-http-proxy
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/gzip-middleware.js
@@ -1,7 +1,7 @@
/*
gzip-middleware.js: Basic example of `connect-gzip` middleware in node-http-proxy
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/modifyResponse-middleware.js
@@ -1,7 +1,7 @@
/*
modifyBody-middleware.js: Example of middleware which modifies response
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
6 changes: 3 additions & 3 deletions examples/websocket/latent-websocket-proxy.js
@@ -1,7 +1,7 @@
/*
standalone-websocket-proxy.js: Example of proxying websockets over HTTP with a standalone HTTP server.
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -59,7 +59,7 @@ server.sockets.on('connection', function (client) {
//
var proxy = new httpProxy.createProxyServer({
target: {
host: 'localhost',
host: 'localhost',
port: 9016
}
});
Expand All @@ -69,7 +69,7 @@ var proxyServer = http.createServer(function (req, res) {
});

//
// Listen to the `upgrade` event and proxy the
// Listen to the `upgrade` event and proxy the
// WebSocket requests as well.
//
proxyServer.on('upgrade', function (req, socket, head) {
Expand Down
4 changes: 2 additions & 2 deletions examples/websocket/standalone-websocket-proxy.js
@@ -1,7 +1,7 @@
/*
standalone-websocket-proxy.js: Example of proxying websockets over HTTP with a standalone HTTP server.
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -68,7 +68,7 @@ var proxyServer = http.createServer(function (req, res) {
});

//
// Listen to the `upgrade` event and proxy the
// Listen to the `upgrade` event and proxy the
// WebSocket requests as well.
//
proxyServer.on('upgrade', function (req, socket, head) {
Expand Down
2 changes: 1 addition & 1 deletion examples/websocket/websocket-proxy.js
@@ -1,7 +1,7 @@
/*
web-socket-proxy.js: Example of proxying over HTTP and WebSockets.
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
5 changes: 2 additions & 3 deletions package.json
Expand Up @@ -6,10 +6,9 @@
"url": "https://github.com/nodejitsu/node-http-proxy.git"
},
"description": "HTTP proxying for the masses",
"author": "Nodejitsu Inc. <info@nodejitsu.com>",
"author": "Charlie Robbins <charlie.robbins@gmail.com>",
"maintainers": [
"yawnt <yawnt@nodejitsu.com>",
"indexzero <charlie@nodejitsu.com>"
"jcrugzz <jcrugzz@gmail.com>"
],
"main": "index.js",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/examples-test.js
@@ -1,7 +1,7 @@
/*
examples-test.js: Test to run all the examples
Copyright (c) Nodejitsu 2013
Copyright (c) 2013 - 2016 Charlie Robbins, Jarrett Cruger & the Contributors.
*/
var path = require('path'),
Expand Down

1 comment on commit f345a1a

@perlun
Copy link

@perlun perlun commented on f345a1a Mar 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean 2016, right? 😄

Please sign in to comment.