import { ResponseCookie } from "next/dist/compiled/@edge-runtime/cookies/index"; import { NextRequest, NextResponse } from "next/server"; //#region src/proxy/proxy.d.ts type ProxyOptions = { /** Whether to skip adding alternate link headers to the response. */ skipAlternateLinkHeader?: boolean; /** The base site URL to use for alternate link headers. */ baseURL?: string | URL; /** How to handle locale negotiation. */ localeNegotiation?: "default" | "skip" | "force"; /** The name of the cookie to use for storing the user's preferred locale. */ localeCookieName?: string; /** The options to use for the locale cookie. */ 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, baseURL, 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; //#endregion export { proxy as n, proxyExport as r, ProxyOptions as t };