Skip to content

Commit

Permalink
docs(readme): grammar and spelling fixes (#81)
Browse files Browse the repository at this point in the history
Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
  • Loading branch information
Fdawgs authored Jan 5, 2025
1 parent f1d138a commit f34385b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![NPM version](https://img.shields.io/npm/v/@fastify/proxy-addr.svg?style=flat)](https://www.npmjs.com/package/@fastify/proxy-addr)
[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)

Determine address of proxied request.
Determine the address of a proxied request.

Forked from https://github.com/jshttp/proxy-addr to address https://github.com/jshttp/forwarded/pull/9.

Expand Down Expand Up @@ -37,7 +37,7 @@ proxyaddr(req, function (addr) { return addr === '127.0.0.1' })
proxyaddr(req, function (addr, i) { return i < 1 })
```

The `trust` arugment may also be a single IP address string or an
The `trust` argument may also be a single IP address string or an
array of trusted addresses, as plain IP addresses, CIDR-formatted
strings, or IP/netmask strings.

Expand Down Expand Up @@ -88,7 +88,7 @@ from the socket address.

### proxyaddr.all(req, [trust])

Return all the addresses of the request, optionally stopping at the
Return all the request addresses, optionally stopping at the
first untrusted. This array is ordered from closest to furthest
(i.e. `arr[0] === req.connection.remoteAddress`).

Expand Down Expand Up @@ -121,8 +121,8 @@ const addr = proxyaddr(req, trust)
```

This function is meant to be optimized for use against every request.
It is recommend to compile a trust function up-front for the trusted
configuration and pass that to `proxyaddr(req, trust)` for each request.
It is recommended that a trust function be compiled up-front for the
trusted configuration and passed to proxyaddr(req, trust) for each request.

## Testing

Expand All @@ -133,9 +133,9 @@ $ npm test
## Benchmarks

```sh
$ npm run-script bench
$ npm run bench
```

## License

[MIT](LICENSE)
Licensed under [MIT](./LICENSE).

0 comments on commit f34385b

Please sign in to comment.