You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ received with a given prefix (or none) to an upstream. All Fastify hooks are sti
11
11
`@fastify/http-proxy` is built on top of
12
12
[`@fastify/reply-from`](https://npm.im/@fastify/reply-from), which enables single route proxying.
13
13
14
-
This plugin can be used in a variety of circumstances, for example if you have to proxy an internal domain to an external domain (useful to avoid CORS problems) or to implement your own API gateway for a microservices architecture.
14
+
This plugin can be used in a variety of circumstances, for example, if you have to proxy an internal domain to an external domain (useful to avoid CORS problems) or to implement your own API gateway for a microservices architecture.
This will proxy any request starting with `/api` to `http://my-api.example.com`. For instance `http://localhost:3000/api/users` will be proxied to `http://my-api.example.com/users`.
42
+
This will proxy any request starting with `/api` to `http://my-api.example.com`. For instance,`http://localhost:3000/api/users` will be proxied to `http://my-api.example.com/users`.
43
43
44
44
If you want to have different proxies on different prefixes you can register multiple instances of the plugin as shown in the following snippet:
45
45
@@ -81,9 +81,9 @@ server.register(proxy, {
81
81
server.listen({ port:3000 });
82
82
```
83
83
84
-
Notice that in this case it is important to use the `prefix` option to tell the proxy how to properly route the requests across different upstreams.
84
+
Notice that in this case, it is important to use the `prefix` option to tell the proxy how to properly route the requests across different upstreams.
85
85
86
-
Also notice paths in `upstream` are ignored, so you need to use `rewritePrefix` to specify the target base path.
86
+
Also, notice paths in `upstream` are ignored, so you need to use `rewritePrefix` to specify the target base path.
87
87
88
88
For other examples, see [`example.js`](examples/example.js).
89
89
@@ -229,7 +229,7 @@ The default implementation forwards the `cookie` header.
229
229
230
230
## Benchmarks
231
231
232
-
The following benchmarks where generated on a dedicated server with an Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz and 64GB of RAM:
232
+
The following benchmarks were generated on a dedicated server with an Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz and 64GB of RAM:
0 commit comments