import { ResponseCookie } from 'next/dist/compiled/@edge-runtime/cookies'; import { NextRequest, NextResponse } from 'next/server'; type ProxyOptions = { skipAlternateLinkHeader?: boolean; localeNegotiation?: "default" | "skip" | "force"; localeCookieName?: string; localeCookieOpts?: Partial; }; /** * The proxy handles locale negotiation and adds alternate links of the page to the response headers. * * @example * import nextGlobeGenProxy from "next-globe-gen/proxy"; * export function proxy(request) { * const response = nextGlobeGenProxy(request); * // other custom logic that possibly modify the response * return response; * } * // Ignore next internals and static assets * export const config = { * matcher: ["/((?!_next|.*\\.).*)"], * }; */ declare function proxy(request: NextRequest, { skipAlternateLinkHeader, localeNegotiation, localeCookieName, localeCookieOpts, }?: ProxyOptions): NextResponse; /** * The proxy handles locale negotiation and adds alternate links of the page to the response headers. * * @example * export { proxy } from "next-globe-gen/proxy"; * // Ignore next internals and static assets * export const config = { * matcher: ["/((?!_next|.*\\.).*)"], * }; */ declare const proxyExport: typeof proxy; export { type ProxyOptions, proxy as default, proxyExport as proxy };