Skip to content

Commit 62728e2

Browse files
committed
release v1.0.8
1 parent b915ced commit 62728e2

File tree

5 files changed

+66
-117
lines changed

5 files changed

+66
-117
lines changed

build/index.d.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
import { NextApiResponse, NextApiRequest } from "next";
2-
import { ServerOptions } from "http-proxy";
3-
export interface NextHttpProxyMiddlewareOptions extends ServerOptions {
4-
pathRewrite?: {
5-
[key: string]: string;
6-
};
7-
}
8-
/**
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-
* @param pathRewrite
13-
*/
14-
export declare const rewritePath: (url: string, pathRewrite: {
15-
[key: string]: string;
16-
}) => string;
17-
/**
18-
* Next.js HTTP Proxy Middleware
19-
* @see https://nextjs.org/docs/api-routes/api-middlewares
20-
* @param {NextApiRequest} req
21-
* @param {NextApiResponse} res
22-
* @param {NextHttpProxyMiddlewareOptions} httpProxyOptions
23-
*/
24-
declare const httpProxyMiddleware: (req: NextApiRequest, res: NextApiResponse<any>, httpProxyOptions?: NextHttpProxyMiddlewareOptions) => Promise<any>;
25-
export default httpProxyMiddleware;
1+
import { NextApiResponse, NextApiRequest } from "next";
2+
import { ServerOptions } from "http-proxy";
3+
export interface NextHttpProxyMiddlewareOptions extends ServerOptions {
4+
pathRewrite?: {
5+
[key: string]: string;
6+
};
7+
}
8+
/**
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+
* @param pathRewrite
13+
*/
14+
export declare const rewritePath: (url: string, pathRewrite: {
15+
[key: string]: string;
16+
}) => string;
17+
/**
18+
* Next.js HTTP Proxy Middleware
19+
* @see https://nextjs.org/docs/api-routes/api-middlewares
20+
* @param {NextApiRequest} req
21+
* @param {NextApiResponse} res
22+
* @param {NextHttpProxyMiddlewareOptions} httpProxyOptions
23+
*/
24+
declare const httpProxyMiddleware: (req: NextApiRequest, res: NextApiResponse<any>, httpProxyOptions?: NextHttpProxyMiddlewareOptions) => Promise<any>;
25+
export default httpProxyMiddleware;

build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/index.test.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

0 commit comments

Comments
 (0)