dynamic-reverse-proxy
Advanced tools
Comparing version 0.6.0 to 0.7.0-alpha1
@@ -6,3 +6,2 @@ var http = require("http"), | ||
server.on("request", function (req, res) { | ||
console.log(JSON.stringify(req.headers, true, 2)); | ||
if (req.url.match(/^\/register/i)) { | ||
@@ -9,0 +8,0 @@ dynamicProxy.registerRouteRequest(req, res); |
13
index.js
@@ -1,2 +0,11 @@ | ||
var DynamicProxy = require("./lib/dynamicProxy"); | ||
module.exports = function () { return new DynamicProxy(); }; | ||
var config = require("./config") | ||
var isDebug = config.debug ? true : false; | ||
module.exports = function () { | ||
if (isDebug) { | ||
var pxy = new (require("./lib/debug/dynamic-proxy.js"))(); | ||
pxy.debug = true; | ||
return pxy; | ||
} else { | ||
return new (require("./lib/release/dynamic-proxy.js"))(); | ||
} | ||
}; |
{ | ||
"author": "Andrew Dunkman <andrew@dunkman.org>", | ||
"name": "dynamic-reverse-proxy", | ||
"version": "0.6.0", | ||
"contributors": [ | ||
{ | ||
"name": "Andrew Dunkman", | ||
"email": "andrew@dunkman.org" | ||
}, | ||
{ | ||
"name": "Joe Andaverde" | ||
}, | ||
{ | ||
"name": "Jeremy Sellars", | ||
"email": "jeremy.sellars@softekinc.com" | ||
} | ||
], | ||
"license": "MIT", | ||
"version": "0.7.0-alpha1", | ||
"scripts": { | ||
"prepublish": "lein build-release & keybase dir sign" | ||
}, | ||
"repository": { | ||
"url": "git://github.com/softek/dynamic-reverse-proxy.git" | ||
"type": "git", | ||
"url": "https://github.com/softek/dynamic-reverse-proxy" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/softek/dynamic-reverse-proxy/issues" | ||
}, | ||
"keywords": [ | ||
"reverse proxy" | ||
], | ||
"dependencies": { | ||
"http-proxy": "1.1.4" | ||
"http-proxy": "1.9.0" | ||
}, | ||
"engines": { | ||
"node": "*" | ||
}, | ||
"devDependencies": { | ||
"closurecompiler-externs": "^1.0.4" | ||
} | ||
} |
@@ -5,4 +5,24 @@ # dynamic-reverse-proxy | ||
[Dynamic-reverse-proxy](http://github.com/softek/dynamic-reverse-proxy) exposes several web apps on a single port so you can: | ||
* **Use the right language for the job.** Maybe you want to use the best parts of [Clojure](http://clojure.org/), [Node.js](https://nodejs.org/about/), [Erlang](http://www.erlang.org/), [Ruby](https://www.ruby-lang.org/). Put each project on its own port and use dynamic-reverse-proxy to expose a unified front to the world. | ||
* **Partition parts of the web app for stability**. Put experimental features in their own process and relay the traffic. | ||
* **Only bother with HTTPS in one place**. You can expose HTTPS to the world, but your "behind the proxy" apps don't need to worry about HTTPS. | ||
##### Latest stable release: 0.6.0 [Doc](https://github.com/softek/dynamic-reverse-proxy/blob/0b770e23c59818fe514e41897f7bf609efff474b/README.md) | ||
`npm install dynamic-reverse-proxy` | ||
##### Latest unstable release: 0.7.0-alpha1 | ||
`npm install dynamic-reverse-proxy@0.7.0-alpha1` | ||
## Starting the server | ||
#### Stand-alone (available starting 0.7.0) | ||
```dos | ||
npm install dynamic-reverse-proxy | ||
cd node_modules\dynamic-reverse-proxy | ||
SET port=3000 | ||
npm start | ||
``` | ||
#### With code | ||
```javascript | ||
@@ -96,1 +116,14 @@ var http = require("http"), | ||
``` | ||
## Troubleshooting | ||
This package comes with both an optimized/minified "release" version, and a more-readable "debug" version. To use the debug version, set `debug: true` in ./config.js. | ||
## Development | ||
### Roadmap | ||
* Allowing HOST-specific routes (`http://example.com/` gets a different route than `http://subdomain.example.com/` depending on the host header) | ||
* Requiring encryption for some routes (for example, force the `/login` route to use HTTPS) | ||
* Performance improvements for proxies with many routes. Before v0.7.0, the complexity was o(n) and O(n) because it uses the longest prefix that works. This may become more important when certain areas of sites force HTTPS - that may use more routes, depending on your URL scheme. | ||
### Scripts | ||
* To set the version (in package.json, project.clj, resources/version.js): `lein set-version 0.x.x-alphaX`. You can also `:dry-run true` to [see what changes would be made](https://github.com/pallet/lein-set-version#dry-run-mode). |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
2277363
17
20506
1
128
1
4
3
4
+ Addedeventemitter3@0.1.6(transitive)
+ Addedhttp-proxy@1.9.0(transitive)
+ Addedrequires-port@0.0.1(transitive)
- Removedeventemitter3@5.0.1(transitive)
- Removedhttp-proxy@1.1.4(transitive)
Updatedhttp-proxy@1.9.0