Skip to content

Commit 0275126

Browse files
committed
release v1.1.0
1 parent 4e7e1ae commit 0275126

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

build/index.d.ts

+11-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,23 @@ import { ServerOptions } from "http-proxy";
33
export interface NextHttpProxyMiddlewareOptions extends ServerOptions {
44
pathRewrite?: {
55
[key: string]: string;
6-
};
6+
} | {
7+
patternStr: string;
8+
replaceStr: string;
9+
}[];
710
}
811
/**
9-
* If a key pattern is found in `pathRewrite` that matches the url value,
10-
* replace matched string of url with the `pathRewrite` value.
11-
* @param req
12+
* If pattern information matching the input url information is found in the `pathRewrite` array,
13+
* the url value is partially replaced with the `pathRewrite.replaceStr` value.
14+
* @param url
1215
* @param pathRewrite
1316
*/
1417
export declare const rewritePath: (url: string, pathRewrite: {
1518
[key: string]: string;
16-
}) => string;
19+
} | {
20+
patternStr: string;
21+
replaceStr: string;
22+
}[] | undefined) => string;
1723
/**
1824
* Next.js HTTP Proxy Middleware
1925
* @see https://nextjs.org/docs/api-routes/api-middlewares

build/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "next-http-proxy-middleware",
3-
"version": "1.0.10",
3+
"version": "1.1.0",
44
"description": "Nextjs HTTP Proxy Middleware",
55
"main": "build/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)