Create professional demos and 3D mockups in seconds, directly in your browser
feat: implement internationalization middleware and update proxy handling
CristianOlivera124da6de6b964
diff --git a/i18n.ts b/i18n.tsnew file mode 100644index 0000000..b125f4f--- /dev/null+++ b/i18n.ts@@ -0,0 +1,18 @@+import { getRequestConfig } from 'next-intl/server';++export const locales = ['es', 'en'] as const;+export const defaultLocale = 'es' as const;+export type Locale = (typeof locales)[number];++export default getRequestConfig(async ({ requestLocale }) => {+ const locale = await requestLocale;++ const baseLocale = (locale && locales.includes(locale as Locale))+ ? locale+ : defaultLocale;++ return {+ locale: baseLocale,+ messages: (await import(`./messages/${baseLocale}.json`)).default+ };+});\ No newline at end of filediff --git a/navigation.ts b/navigation.tsnew file mode 100644index 0000000..f4ddfa3--- /dev/null+++ b/navigation.ts@@ -0,0 +1,5 @@+import { createNavigation } from 'next-intl/navigation';+import { locales } from './i18n';++export const { Link, redirect, usePathname, useRouter } =+ createNavigation({ locales });\ No newline at end of filediff --git a/next.config.ts b/next.config.tsindex fb6846b..e9e19fb 100644--- a/next.config.ts+++ b/next.config.ts@@ -1,4 +1,7 @@import type { NextConfig } from "next";+import createNextIntlPlugin from 'next-intl/plugin';++const withNextIntl = createNextIntlPlugin('./i18n.ts');const nextConfig: NextConfig = {images: {@@ -27,4 +30,4 @@ const nextConfig: NextConfig = {}]};-export default nextConfig;+export default withNextIntl(nextConfig);diff --git a/package.json b/package.jsonindex 4d1c241..829f22c 100644--- a/package.json+++ b/package.json@@ -23,6 +23,7 @@"lucide-react": "^0.563.0","mediabunny": "^1.34.4","next": "16.1.6",+ "next-intl": "^4.9.1","radix-ui": "^1.4.3","react": "19.2.3","react-dom": "19.2.3",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 8fcc3b5..e743a01 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -50,6 +50,9 @@ importers:next:specifier: 16.1.6+ next-intl:+ specifier: ^4.9.1+ version: 4.9.1([email protected](@babel/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])radix-ui:specifier: ^1.4.3version: 1.4.3(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])@@ -327,6 +330,18 @@ packages:'@floating-ui/[email protected]':resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==}+ '@formatjs/[email protected]':+ resolution: {integrity: sha512-vPnriihkfK0lzoQGaXq+qXH23VsYyansRTkTgo2aTG0k1NjLFyZimFVdfj4C9JkSE5dm7CEngcQ5TTc1yAyBfQ==}++ '@formatjs/[email protected]':+ resolution: {integrity: sha512-JVY39ROgLt+pIYngo6piyj4OVfZmXs/2FkC4wLS+ql1Eig/sGJKB7YwDO/5bkJFkfwaFAeIpgEiJc8hiYxNalw==}++ '@formatjs/[email protected]':+ resolution: {integrity: sha512-8bSFZbrlvGX11ywMZxtgkPBt5Q8/etyts7j7j+GWpOVK1g43zwMIH3LZxk43HAtEP7L/jtZ+OZaMiFTOiBj9CA==}++ '@formatjs/[email protected]':+ resolution: {integrity: sha512-pHUjWb9NuhnMs8+PxQdzBtZRFJHlGhrURGAbm6Ltwl82BFajeuiIR3jblSa7ia3r62rXe/0YtVpUG3xWr5bFCA==}+'@hono/[email protected]':resolution: {integrity: sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==}engines: {node: '>=18.14.1'}@@ -681,6 +696,94 @@ packages:'@open-draft/[email protected]':resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==}+ '@parcel/[email protected]':+ resolution: {integrity: sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A==}+ engines: {node: '>= 10.0.0'}+ cpu: [arm64]+ os: [android]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA==}+ engines: {node: '>= 10.0.0'}+ cpu: [arm64]+ os: [darwin]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg==}+ engines: {node: '>= 10.0.0'}+ cpu: [x64]+ os: [darwin]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng==}+ engines: {node: '>= 10.0.0'}+ cpu: [x64]+ os: [freebsd]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ==}+ engines: {node: '>= 10.0.0'}+ cpu: [arm]+ os: [linux]+ libc: [glibc]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg==}+ engines: {node: '>= 10.0.0'}+ cpu: [arm]+ os: [linux]+ libc: [musl]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA==}+ engines: {node: '>= 10.0.0'}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA==}+ engines: {node: '>= 10.0.0'}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==}+ engines: {node: '>= 10.0.0'}+ cpu: [x64]+ os: [linux]+ libc: [glibc]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg==}+ engines: {node: '>= 10.0.0'}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q==}+ engines: {node: '>= 10.0.0'}+ cpu: [arm64]+ os: [win32]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g==}+ engines: {node: '>= 10.0.0'}+ cpu: [ia32]+ os: [win32]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw==}+ engines: {node: '>= 10.0.0'}+ cpu: [x64]+ os: [win32]++ '@parcel/[email protected]':+ resolution: {integrity: sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==}+ engines: {node: '>= 10.0.0'}+'@radix-ui/[email protected]':resolution: {integrity: sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==}@@ -1374,6 +1477,9 @@ packages:'@rtsao/[email protected]':resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==}+ '@schummar/[email protected]':+ resolution: {integrity: sha512-bXHSaW5jRTmke9Vd0h5P7BtWZG9Znqb8gSDxZnxaGSJnGwPLDPfS+3g0BKzeWqzgZPsIVZkM7m2tbo18cm5HBw==}+'@sec-ant/[email protected]':resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}@@ -1413,9 +1519,102 @@ packages:resolution: {integrity: sha512-CAeFm5sfX8sbTzxoxRafhohreIzl9a7R6qHTck3MrgTqm5M5g/u0IHfEKYzI9w/17r8NINl8UZrw2i08wrO7Iw==}engines: {node: '>=20.0.0'}+ '@swc/[email protected]':+ resolution: {integrity: sha512-OmcP96CFsNOwa65tamQayRcfqhNlcQ3YCWOq+0Wb+CAM4uB7kOMrXY41Gj4atthxrGhLQ9pg7Vk26iApb88idA==}+ engines: {node: '>=10'}+ cpu: [arm64]+ os: [darwin]++ '@swc/[email protected]':+ resolution: {integrity: sha512-liTTTpKSv89ivIxcZ+iU1cRige9Y7JkOjVnJ2Ystzl+DsWNHqt7wLTTgm/u7gEqmmAS2JKryODLQn3q1UtFNPQ==}+ engines: {node: '>=10'}+ cpu: [x64]+ os: [darwin]++ '@swc/[email protected]':+ resolution: {integrity: sha512-Y/g+m3I8CeBof5A3kWWOS6QA2HOIUytF5EeTgfwcAK+GKT/tGe7Xqo5svBtaqflU5od2zzbMTWqkinPXgRWGgA==}+ engines: {node: '>=10'}+ cpu: [arm]+ os: [linux]++ '@swc/[email protected]':+ resolution: {integrity: sha512-19IvwyPfBN/rz9s7qXhOTQmW0922+pjpRUUvIebu+CMM75nX6YuDzHsGx8hSmn5dS89SNaMCh1lgUuXqm++6jg==}+ engines: {node: '>=10'}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]++ '@swc/[email protected]':+ resolution: {integrity: sha512-iNlbvTIo425rkKzDLLWFJGnFXr3myETUdIDHcjuiPNZE8b0ogmcAuilC4yEJX7FSHGbnlsoJcCT2xf4b3VJmmQ==}+ engines: {node: '>=10'}+ cpu: [arm64]+ os: [linux]+ libc: [musl]++ '@swc/[email protected]':+ resolution: {integrity: sha512-AuuEOtG+YXKIjIUup4RsxYNklx6XVB3WKWfhxG6hnfPrn7vp89RNOLbbyyprgj6Sk7k9ulwGVTJElEvmBNPSCA==}+ engines: {node: '>=10'}+ cpu: [ppc64]+ os: [linux]+ libc: [glibc]++ '@swc/[email protected]':+ resolution: {integrity: sha512-JcMDWQvW1BchUyRg8E0jHiTx7CQYpUr5uDEL1dnPDECrEjBEGG2ynmJ3XX70sWXql0JagqR1t3VpANYFWdUnqA==}+ engines: {node: '>=10'}+ cpu: [s390x]+ os: [linux]+ libc: [glibc]++ '@swc/[email protected]':+ resolution: {integrity: sha512-FW7V7Mbpq4+PA7BiAq76LJs8MdNuUSylyuRVfQRkhIyeWadFroZ+KOPgjku8Z/fXzngxBRvsk+PGGB0t8mGcjA==}+ engines: {node: '>=10'}+ cpu: [x64]+ os: [linux]+ libc: [glibc]++ '@swc/[email protected]':+ resolution: {integrity: sha512-w8erqMHsVcdGwUfJxF6LaiTuPoKnyLOcUbhLcxiXrlLt5MLjtlgcIeUY/NWK/oPoyqkgH+/i8pOJnMTxvl83ZQ==}+ engines: {node: '>=10'}+ cpu: [x64]+ os: [linux]+ libc: [musl]++ '@swc/[email protected]':+ resolution: {integrity: sha512-uDCWCNpUiqkbvPmsuPUTn/P7ag9SqNXD2JT/W3dUu7yZ2krzN+nmmoQ2xRX63/J6RYiHI7aT4jo7Z++lsljlPA==}+ engines: {node: '>=10'}+ cpu: [arm64]+ os: [win32]++ '@swc/[email protected]':+ resolution: {integrity: sha512-2k1ax1QmmqLEnpC0uRCw7OXhBfyvdPqERBXupDasjYbChT6ZSO/uha28Bp38cw0viKIG79L27aTDkbkABsMW3w==}+ engines: {node: '>=10'}+ cpu: [ia32]+ os: [win32]++ '@swc/[email protected]':+ resolution: {integrity: sha512-aUuYecSEGa4SUSdyCWaI/vk8jdseifYnsF1GZQx2+piL8GIuT/5QrVcFfmes4Iwy7FIVXxtzD063z/FfpZ7K7w==}+ engines: {node: '>=10'}+ cpu: [x64]+ os: [win32]++ '@swc/[email protected]':+ resolution: {integrity: sha512-tglZGyx8N5PC+x1Nd/JrZxqpqlcZoSuG9gTDKO6AuFToFiVB3uS8HvbKFuO7g3lJzvFf9riAb94xs9HU2UhAHQ==}+ engines: {node: '>=10'}+ peerDependencies:+ '@swc/helpers': '>=0.5.17'+ peerDependenciesMeta:+ '@swc/helpers':+ optional: true++ '@swc/[email protected]':+ resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==}+'@swc/[email protected]':resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}+ '@swc/[email protected]':+ resolution: {integrity: sha512-lyMwd7WGgG79RS7EERZV3T8wMdmPq3xwyg+1nmAM64kIhx5yl+juO2PYIHb7vTiPgPCj8LYjsNV2T5wiQHUEaw==}+'@tailwindcss/[email protected]':resolution: {integrity: sha512-DoR7U1P7iYhw16qJ49fgXUlry1t4CpXeErJHnQ44JgTSKMaZUdf17cfn5mHchfJ4KRBZRFA/Coo+MUF5+gOaCQ==}@@ -2566,6 +2765,9 @@ packages:resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==}engines: {node: '>=0.10.0'}+ resolution: {integrity: sha512-6NkfF9GHHFouqnz+wuiLjCWQiyxoEyJ5liUv4Jxxo/8wyhV7MY0L0iTEGDAVEa4aAD58WqTxFMa20S5nyMjwNw==}+resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}engines: {node: '>= 4'}@@ -2589,6 +2791,9 @@ packages:resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-1gAVEUt3wEPvTqML4Fsw9klZV5j0vszQxayP/fi6gUroAc8AUHiNaisBKLWxybL1AdWq1mP07YV1q8v4N92ilQ==}+resolution: {integrity: sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==}engines: {node: '>= 12'}@@ -3051,6 +3256,19 @@ packages:resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==}engines: {node: '>= 0.6'}+ resolution: {integrity: sha512-8whJJ6oxJz8JqkHarggmmuEDyXgC7nEnaPhZD91CJwEWW4xp0AST3Mw17YxvHyP2vAF3taWfFbs1maD+WWtz3w==}++ resolution: {integrity: sha512-N7ga0CjtYcdxNvaKNIi6eJ2mmatlHK5hp8rt0YO2Omoc1m0gean242/Ukdj6+gJNiReBVcYIjK0HZeNx7CV1ug==}+ peerDependencies:+ next: ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0+ typescript: '*'+ peerDependenciesMeta:+ typescript:+ optional: true+resolution: {integrity: sha512-hkyRkcu5x/41KoqnROkfTm2pZVbKxvbZRuNvKXLRXxs3VfyO0WhY50TQS40EuKO9SW3rBj/sF3WbVwDACeMZyw==}engines: {node: '>=20.9.0'}@@ -3072,6 +3290,9 @@ packages:sass:optional: true+ resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==}+resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}engines: {node: '>=10.5.0'}@@ -3228,6 +3449,9 @@ packages:resolution: {integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==}engines: {node: '>=16.20.0'}+ resolution: {integrity: sha512-ECF4zHLbUItpUgE3OTtLKlPjeBN+fKEczj2zYjDfCGOzicNs0GK3Vg2IoAYwx7LH/XYw43fZQP6xnZ4TkNxSLQ==}+resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==}engines: {node: '>= 0.4'}@@ -3750,6 +3974,11 @@ packages:'@types/react':optional: true+ resolution: {integrity: sha512-iGVV/xFYlhe3btafRlL8RPLD2Jsuet4yqn9DR6LWWbMhULsJnXgLonDkzDmsAIBIwFtk02oJuX/Ox2vwHKF+UQ==}+ peerDependencies:+ react: ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0+resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==}engines: {node: '>=10'}@@ -4183,6 +4412,18 @@ snapshots:'@floating-ui/[email protected]': {}+ '@formatjs/[email protected]': {}++ '@formatjs/[email protected]':+ dependencies:+ '@formatjs/icu-skeleton-parser': 2.1.4++ '@formatjs/[email protected]': {}++ '@formatjs/[email protected]':+ dependencies:+ '@formatjs/fast-memoize': 3.1.2+'@hono/[email protected]([email protected])':dependencies:hono: 4.11.9@@ -4454,6 +4695,66 @@ snapshots:'@open-draft/[email protected]': {}+ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ optional: true++ '@parcel/[email protected]':+ dependencies:+ detect-libc: 2.1.2+ is-glob: 4.0.3+ node-addon-api: 7.1.1+ picomatch: 4.0.3+ optionalDependencies:+ '@parcel/watcher-android-arm64': 2.5.6+ '@parcel/watcher-darwin-arm64': 2.5.6+ '@parcel/watcher-darwin-x64': 2.5.6+ '@parcel/watcher-freebsd-x64': 2.5.6+ '@parcel/watcher-linux-arm-glibc': 2.5.6+ '@parcel/watcher-linux-arm-musl': 2.5.6+ '@parcel/watcher-linux-arm64-glibc': 2.5.6+ '@parcel/watcher-linux-arm64-musl': 2.5.6+ '@parcel/watcher-linux-x64-glibc': 2.5.6+ '@parcel/watcher-linux-x64-musl': 2.5.6+ '@parcel/watcher-win32-arm64': 2.5.6+ '@parcel/watcher-win32-ia32': 2.5.6+ '@parcel/watcher-win32-x64': 2.5.6+'@radix-ui/[email protected]': {}'@radix-ui/[email protected]': {}@@ -5203,6 +5504,8 @@ snapshots:'@rtsao/[email protected]': {}+ '@schummar/[email protected]': {}+'@sec-ant/[email protected]': {}'@sindresorhus/[email protected]': {}@@ -5252,10 +5555,70 @@ snapshots:- bufferutil- utf-8-validate+ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ optional: true++ '@swc/[email protected]':+ dependencies:+ '@swc/counter': 0.1.3+ '@swc/types': 0.1.26+ optionalDependencies:+ '@swc/core-darwin-arm64': 1.15.26+ '@swc/core-darwin-x64': 1.15.26+ '@swc/core-linux-arm-gnueabihf': 1.15.26+ '@swc/core-linux-arm64-gnu': 1.15.26+ '@swc/core-linux-arm64-musl': 1.15.26+ '@swc/core-linux-ppc64-gnu': 1.15.26+ '@swc/core-linux-s390x-gnu': 1.15.26+ '@swc/core-linux-x64-gnu': 1.15.26+ '@swc/core-linux-x64-musl': 1.15.26+ '@swc/core-win32-arm64-msvc': 1.15.26+ '@swc/core-win32-ia32-msvc': 1.15.26+ '@swc/core-win32-x64-msvc': 1.15.26++ '@swc/[email protected]': {}+'@swc/[email protected]':dependencies:tslib: 2.8.1+ '@swc/[email protected]':+ dependencies:+ '@swc/counter': 0.1.3+'@tailwindcss/[email protected]':dependencies:'@jridgewell/remapping': 2.3.5@@ -6532,6 +6895,10 @@ snapshots:dependencies:safer-buffer: 2.1.2+ dependencies:+ '@formatjs/icu-messageformat-parser': 3.5.4+@@ -6551,6 +6918,11 @@ snapshots:hasown: 2.0.2side-channel: 1.1.0+ dependencies:+ '@formatjs/fast-memoize': 3.1.2+ '@formatjs/icu-messageformat-parser': 3.5.4+@@ -6945,6 +7317,25 @@ snapshots:+ [email protected]: {}++ [email protected]([email protected](@babel/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]):+ dependencies:+ '@formatjs/intl-localematcher': 0.8.3+ '@parcel/watcher': 2.5.6+ '@swc/core': 1.15.26+ icu-minify: 4.9.1+ negotiator: 1.0.0+ next-intl-swc-plugin-extractor: 4.9.1+ po-parser: 2.1.1+ react: 19.2.3+ use-intl: 4.9.1([email protected])+ optionalDependencies:+ typescript: 5.9.3+ transitivePeerDependencies:+ - '@swc/helpers'+[email protected](@babel/[email protected])([email protected]([email protected]))([email protected]):dependencies:'@next/env': 16.1.6@@ -6969,6 +7360,8 @@ snapshots:- '@babel/core'- babel-plugin-macros+ [email protected]: {}+@@ -7133,6 +7526,8 @@ snapshots:+ [email protected]: {}+@@ -7850,6 +8245,14 @@ snapshots:optionalDependencies:'@types/react': 19.2.13+ dependencies:+ '@formatjs/fast-memoize': 3.1.2+ '@schummar/icu-type-parser': 1.21.5+ icu-minify: 4.9.1+ intl-messageformat: 11.2.1+ react: 19.2.3+dependencies:detect-node-es: 1.1.0diff --git a/proxy.ts b/proxy.tsindex 845be13..95ba2f3 100644--- a/proxy.ts+++ b/proxy.ts@@ -1,29 +1,31 @@import { updateSession } from "@/utils/supabase/middleware";import { type NextRequest } from "next/server";+import createIntlMiddleware from 'next-intl/middleware';+import { locales, defaultLocale } from './i18n';-export async function proxy(request: NextRequest) {- const response = await updateSession(request);+const intlMiddleware = createIntlMiddleware({+ locales,+ defaultLocale,+ localePrefix: 'as-needed',+ localeDetection: true+});- const country =- request.headers.get('x-vercel-ip-country') ||- request.headers.get('cf-ipcountry') ||- 'UNKNOWN';+export default async function proxy(request: NextRequest) {+ const country = request.headers.get('x-vercel-ip-country') || 'UNKNOWN';- response.headers.set('x-user-country', country);+ const intlResponse = intlMiddleware(request);+ intlResponse.headers.set('x-user-country', country);- return response;+ const supabaseResponse = await updateSession(request);+ supabaseResponse.cookies.getAll().forEach((cookie) => {+ intlResponse.cookies.set(cookie.name, cookie.value);+ });++ return intlResponse;}export const config = {matcher: [- /*- * Match all request paths except for the ones starting with:- * - _next/static (static files)- * - _next/image (image optimization files)- * - favicon.ico (favicon file)- * - public folder- * - api routes that don't need auth- */- "/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)",+ '/((?!api|ffmpeg|_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp|mp4|avif|webm|wasm|js)$).*)'],-};+};\ No newline at end of file