<commit_before># benderjs-proxy

[node-http-proxy](https://github.com/nodejitsu/node-http-proxy) wrapper for bender. Especially useful for Cross-Origin testing with bender.

## Installation

```
npm install benderjs-proxy
```

## Usage

Add `benderjs-proxy` to the `plugins` array in your `bender.js` configuration file:

```javascript
var config = {
	plugins: [ 'benderjs-proxy' ] // load the plugin
};

module.exports = config;
```

## Configuration

You can configure proxy in `bender.js` configuration file.
```javascript
var config = {
	proxy: {
		// Below option will redirect all requests from http://127.0.0.1:1030/google to http://google.com
		'/google': 'http://google.com'
	}
};

module.exports = config;
```

## License

MIT, for license details see: [LICENSE.md](https://github.com/benderjs/benderjs-jquery/blob/master/LICENSE.md).
<commit_msg>Readme: Mentioned about passing function in config.<commit_after># benderjs-proxy

[node-http-proxy](https://github.com/nodejitsu/node-http-proxy) wrapper for bender. Especially useful for Cross-Origin testing with bender.

## Installation

```
npm install benderjs-proxy
```

## Usage

Add `benderjs-proxy` to the `plugins` array in your `bender.js` configuration file:

```javascript
var config = {
	plugins: [ 'benderjs-proxy' ] // load the plugin
};

module.exports = config;
```

## Configuration

You can configure proxy in `bender.js` configuration file.
```javascript
var config = {
	proxy: {
		// Below option will redirect all requests from http://127.0.0.1:1030/google to http://google.com
		'/google': 'http://google.com',
		
		// To make things more flexible, there is a possibility to pass a function which will define a target into proxy.
		// There is a one parameter passed into function which is parsed request url using node url.parse function.
		'some-thing': function( url ) {
			return 'http://example.com/some/thing' + ( url.search || '' )
		}
	}
};

module.exports = config;
```

## License

MIT, for license details see: [LICENSE.md](https://github.com/benderjs/benderjs-jquery/blob/master/LICENSE.md).

{'fraction_non_alphanumeric': 0.13600737667127707, 'fraction_numerical': 0.009220839096357769, 'mean_word_length': 3.3313373253493013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4564070', 'n_tokens_mistral': 742, 'n_tokens_neox': 665, 'n_words': 195}