Skip to content
Permalink
Browse files

[dist] Update LICENSE to reflect 2015 changes.

  • Loading branch information...
indexzero committed Mar 12, 2016
1 parent 0183529 commit f345a1ac2dde1884e72b952a685a0a1796059f14
@@ -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
@@ -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.
@@ -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:
@@ -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
@@ -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
@@ -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 = [
@@ -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);

@@ -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
@@ -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 = [
@@ -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
@@ -31,10 +31,10 @@ var util = require('util'),

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

@@ -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
@@ -44,7 +44,7 @@ httpProxy.createServer({
//


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

http.createServer(function (req, res) {
@@ -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) {
@@ -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
@@ -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.');
});

@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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' });
@@ -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
@@ -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' });
@@ -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
@@ -50,7 +50,7 @@ var server = http.createServer(function(req, res) {
});

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

var sse = new SSE(server, {path: '/'});
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -59,7 +59,7 @@ server.sockets.on('connection', function (client) {
//
var proxy = new httpProxy.createProxyServer({
target: {
host: 'localhost',
host: 'localhost',
port: 9016
}
});
@@ -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) {
@@ -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
@@ -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) {
@@ -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
@@ -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": {
@@ -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'),

1 comment on commit f345a1a

@perlun

This comment has been minimized.

Copy link

commented on f345a1a Mar 14, 2016

You mean 2016, right? 😄

Please sign in to comment.
You can’t perform that action at this time.