Instruction clarification

This commit is contained in:
2026-10-13 00:36:11 +02:00
parent c6f177a37d
commit 103c796e9d
27 changed files with 2596 additions and 1983 deletions
+11
View File
@@ -94,6 +94,17 @@ niżej.
> eksportu, niezależna od nazwy pliku projektu. Migracja:
> `npx @next/codemod@canary middleware-to-proxy .`
> **Zalecane (aktualne): `createProxy`** — robi negocjację locale, redirect
> roota, cookie języka za zgodą i nagłówki `x-locale` / `x-pathname`:
> ```ts
> import { NextResponse } from 'next/server'
> import { createProxy } from '@intecion/ipal-kit'
> import { i18nConfig } from '@/i18n.config'
> export const proxy = createProxy(i18nConfig, { NextResponse })
> export const config = { matcher: ['/((?!api|admin|_next|.*\\..*).*)'] }
> ```
> Ręczny wariant poniżej tylko gdy potrzebujesz własnej logiki w proxy.
```ts
// proxy.ts (projekt klienta) — jedyna logika to podłączenie
import { NextResponse } from 'next/server'