Skip to content

Commit 9216287

Browse files
committed
typo
1 parent 71eeb8d commit 9216287

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ npm install --save-dev http-proxy-middleware
1616
Create and configure the proxy middleware.
1717
```javascript
1818
var proxy = proxyMiddleware('/api', {target: 'http://www.example.org'});
19-
// 'proxy' is now ready to be used is a server.
19+
// 'proxy' is now ready to be used in a server.
2020

2121
```
2222

2323
## Example
2424
```javascript
25-
// dependencies
25+
// include dependencies
2626
var express = require('express');
2727
var proxyMiddleware = require('http-proxy-middleware');
2828

2929
// configure proxy middleware
3030
var context = '/api'; // requests with this path will be proxied
3131
var options = {
32-
target: 'http://www.example.org', // target
32+
target: 'http://www.example.org', // target host
3333
changeOrigin: true // needed for virtual hosted sites
3434
};
3535

@@ -75,8 +75,7 @@ The following options are provided by the underlying [http-proxy](https://www.np
7575
* **option.toProxy**: passes the absolute URL as the `path` (useful for proxying to proxies)
7676
* **option.hostRewrite**: rewrites the location hostname on (301/302/307/308) redirects.
7777
78-
Undocumented options are provided by the underlying [http-proxy](https://www.npmjs.com/package/http-proxy).
79-
https://github.com/nodejitsu/node-http-proxy/blob/master/lib/http-proxy.js#L32
78+
Undocumented options are provided by the underlying [http-proxy](https://github.com/nodejitsu/node-http-proxy/blob/master/lib/http-proxy.js#L32).
8079
* **option.headers**: object, adds [request headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields). (Example: `{host:'www.example.org'}`
8180
* **option.changeOrigin**: true/false, adds host to request header.
8281
* **option.prependPath**: true/false, Default: true - specify whether you want to prepend the target's path to the proxy path>

0 commit comments

Comments
 (0)