Comparing version 8.1.1 to 9.0.0
@@ -5,10 +5,7 @@ var foxy = require("./../index"); | ||
var http = require("http"); | ||
var multi = require("multiline"); | ||
var proxy = foxy("http://www.bbc.co.uk"); | ||
//var proxy = foxy("http://wordpress.dev"); | ||
var proxy = foxy("http://magento.dev"); | ||
var proxy = foxy("http://wordpress.dev", { | ||
whitelist: ["/wp-admin/admin-ajax.php"] | ||
}); | ||
var server = proxy.listen(8181); | ||
console.log(server.address()); |
@@ -13,2 +13,10 @@ var Immutable = require("immutable"); | ||
/** | ||
* White-list for paths to open to middleware | ||
*/ | ||
whitelist: [], | ||
/** | ||
* Black-list for paths to open to middleware | ||
*/ | ||
blacklist: [], | ||
/** | ||
* Cookie options | ||
@@ -15,0 +23,0 @@ */ |
@@ -23,4 +23,5 @@ var respMod = require("resp-modifier"); | ||
var middleware = respMod({ | ||
rules: utils.getRules(config, req.headers.host), | ||
ignorePaths: config.get("ignorePaths") | ||
rules: utils.getRules(config, req.headers.host), | ||
blacklist: config.get("blacklist").toJS(), | ||
whitelist: config.get("whitelist").toJS() | ||
}); | ||
@@ -27,0 +28,0 @@ |
{ | ||
"name": "foxy", | ||
"version": "8.1.1", | ||
"version": "9.0.0", | ||
"description": "Proxy with response modding", | ||
@@ -38,7 +38,7 @@ "main": "index.js", | ||
"eazy-logger": "^2.0.0", | ||
"http-proxy": "^1.7.3", | ||
"http-proxy": "^1.8.1", | ||
"immutable": "^3.3.0", | ||
"meow": "^2.0.0", | ||
"parseurl": "^1.3.0", | ||
"resp-modifier": "^1.0.0" | ||
"resp-modifier": "^2.0.1" | ||
}, | ||
@@ -50,2 +50,3 @@ "devDependencies": { | ||
"connect-gzip": "^0.1.6", | ||
"eazy-logger": "^2.1.1", | ||
"gulp": "^3.8.10", | ||
@@ -52,0 +53,0 @@ "gulp-traceur": "^0.14.1", |
@@ -55,2 +55,14 @@ ##Foxy [![Build Status](https://travis-ci.org/shakyShane/foxy.svg?branch=master)](https://travis-ci.org/shakyShane/foxy) [![Coverage Status](https://img.shields.io/coveralls/shakyShane/foxy.svg)](https://coveralls.io/r/shakyShane/foxy?branch=master) | ||
## white/black lists | ||
You can force some paths to always be processed by the middlewares. | ||
```js | ||
var proxy = foxy("http://wordpress.dev", { | ||
whitelist: ["/wp-admin/admin-ajax.php"], // whitelist checked first | ||
blacklist: ["/wp-admin/**"], | ||
}).listen(8000); | ||
``` | ||
#TODO | ||
@@ -57,0 +69,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19903
598
72
19
+ Addedresp-modifier@2.1.0(transitive)
- Removedresp-modifier@1.0.2(transitive)
Updatedhttp-proxy@^1.8.1
Updatedresp-modifier@^2.0.1