(locale: string)
| 19 | } |
| 20 | |
| 21 | function cookie(locale: string) { |
| 22 | const value = locale === "root" ? "en" : locale |
| 23 | return `oc_locale=${encodeURIComponent(value)}; Path=/; Max-Age=31536000; SameSite=Lax` |
| 24 | } |
| 25 | |
| 26 | function redirect(url: URL, path: string, locale?: string) { |
| 27 | const next = new URL(url.toString()) |