Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

foxy

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

foxy - npm Package Compare versions

Comparing version 8.1.1 to 9.0.0

9

examples/example.wp.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc