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
* Create proxy middleware for Express-like servers. ([list of servers with examples](https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/servers.md))
8
+
*
9
+
* @example Basic proxy to a single target.
10
+
* ```ts
11
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
12
+
*
13
+
* const proxy = createProxyMiddleware({
14
+
* target: 'http://www.example.org',
15
+
* changeOrigin: true,
16
+
* });
17
+
* ```
18
+
*
19
+
* @example Proxy only matching paths and rewrite the forwarded path.
20
+
* ```ts
21
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
22
+
*
23
+
* const proxy = createProxyMiddleware({
24
+
* target: 'http://localhost:3000',
25
+
* pathFilter: '/api',
26
+
* pathRewrite: {
27
+
* '^/api/': '/',
28
+
* },
29
+
* });
30
+
* ```
31
+
*
32
+
* @example Native path rewrite by mounting at a route (alternative to `pathRewrite`).
33
+
* ```ts
34
+
* import express from 'express';
35
+
* import { createProxyMiddleware } from 'http-proxy-middleware';
0 commit comments