import { NextFetchEvent, NextRequest, NextResponse } from "next/server"; //#region src/proxy/multipleProxies.d.ts /** * Utility to combine multiple Next.js proxies into one. * * It executes proxies in order, passing each result as the `response` argument * to the next proxy. Routing instructions (redirects / rewrites) and custom * response headers are merged across the entire chain, so a later proxy that * returns `NextResponse.next()` does not accidentally discard a rewrite set by * an earlier proxy. * * @example * import { multipleProxies, intlayerProxy } from "next-intlayer/proxy"; * import { NextResponse } from "next/server"; * * const authMiddleware = (req: NextRequest) => { * if (!req.cookies.get("token")) { * return NextResponse.redirect(new URL("/login", req.url)); * } * return NextResponse.next(); * }; * * export default multipleProxies([ * intlayerProxy, * authMiddleware, * ]); * * @param proxies - An array of proxy functions to execute in order. * @returns A single proxy function that runs all provided proxies. */ declare const multipleProxies: (proxies: ((req: NextRequest, event?: NextFetchEvent, response?: NextResponse) => NextResponse | Promise)[]) => (req: NextRequest, event?: NextFetchEvent, response?: NextResponse) => Promise>; //#endregion export { multipleProxies }; //# sourceMappingURL=multipleProxies.d.ts.map