Skip to content

Commit b10d730

Browse files
committed
v0.4.0
1 parent 111244a commit b10d730

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
The one-liner proxy middleware for [connect](https://github.com/senchalabs/connect), [express](https://github.com/strongloop/express) and [browser-sync](https://github.com/BrowserSync/browser-sync)
88

9-
## Install
9+
### Install
1010
```javascript
1111
$ npm install --save-dev http-proxy-middleware
1212
```
1313

14-
## Core concept
14+
### Core concept
1515
Configure the proxy middleware.
1616
```javascript
1717
var proxyMiddleware = require('http-proxy-middleware');
@@ -32,7 +32,7 @@ var proxy = proxyMiddleware('/api', {target: 'http://www.example.org'});
3232

3333

3434

35-
## Example
35+
### Example
3636
A simple example with express server.
3737
```javascript
3838
// include dependencies
@@ -59,14 +59,14 @@ See [more examples](#more-examples).
5959

6060
**Tip:** For [name-based virtual hosted sites](http://en.wikipedia.org/wiki/Virtual_hosting#Name-based), you'll need to use the option `changeOrigin` and set it to `true`.
6161

62-
## Compatible servers:
62+
### Compatible servers:
6363
http-proxy-middleware is compatible with the following servers:
6464
* [connect](https://www.npmjs.com/package/connect)
6565
* [express](https://www.npmjs.com/package/express)
6666
* [browser-sync](https://www.npmjs.com/package/browser-sync)
6767

6868

69-
## Options
69+
### Options
7070

7171
* (DEPRECATED) **option.proxyHost**: Use `option.changeOrigin = true` instead.
7272
* **option.pathRewrite**: object, rewrite target's url path. Object-keys will be used as _RegExp_ to match paths.
@@ -100,7 +100,7 @@ Undocumented options are provided by the underlying [http-proxy](https://github.
100100
* **option.protocolRewrite**: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.
101101

102102

103-
## Context matching
103+
### Context matching
104104
Request URL's [ _path-absolute_ and _query_](https://tools.ietf.org/html/rfc3986#section-3) will be used for context matching .
105105
106106
* URL: `http://example.com:8042/over/there?name=ferret#nose`
@@ -122,7 +122,7 @@ http-proxy-middleware offers several ways to decide which requests should be pro
122122
* `['/api/**', '/ajax/**']` combine multiple patterns
123123
* `['/api/**', '!**/bad.json']` exclusion
124124
125-
## More Examples
125+
### More Examples
126126
127127
To run and view the [proxy examples](https://github.com/chimurai/http-proxy-middleware/tree/master/examples), clone the http-proxy-middleware repo and install the dependencies:
128128
@@ -144,7 +144,7 @@ $ node examples/connect
144144
* `examples/browser-sync` - [browser-sync proxy middleware example](https://github.com/chimurai/http-proxy-middleware/tree/master/examples/browser-sync)
145145
* `examples/websocket` - [websocket proxy example](https://github.com/chimurai/http-proxy-middleware/tree/master/examples/websocket) with express
146146

147-
## Tests
147+
### Tests
148148

149149
To run the test suite, first install the dependencies, then run:
150150

@@ -156,8 +156,14 @@ $ npm test
156156
$ npm run cover
157157
```
158158

159+
### Changlog
160+
* [v0.4.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.4.0) - support websocket
161+
* [v0.3.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.3.0) - support wildcard / glob
162+
* [v0.2.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.2.0) - support multiple paths
163+
* [v0.1.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.1.0) - support path rewrite. deprecate proxyHost option
164+
* [v0.0.5](https://github.com/chimurai/http-proxy-middleware/releases/tag/v0.0.5) - initial release
159165

160-
## License:
166+
### License:
161167
The MIT License (MIT)
162168

163169
Copyright (c) 2015 Steven Chim

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "http-proxy-middleware",
3-
"version": "0.3.2",
3+
"version": "0.4.0",
44
"description": "The one-liner proxy middleware for connect, express and browser-sync",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)