@akinon/next 1.103.0-snapshot-ZERO-3648-20251002184136 → 1.103.0-snapshot-ZERO-3648-20251002191321

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @akinon/next
2
2
 
3
- ## 1.103.0-snapshot-ZERO-3648-20251002184136
3
+ ## 1.103.0-snapshot-ZERO-3648-20251002191321
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -36,19 +36,16 @@ function getClientIP(request: NextRequest): string | null {
36
36
  }
37
37
 
38
38
  function getLocaleFromRequest(request: NextRequest): string | null {
39
- const referer = request.headers.get('referer') || '';
40
- const localeMatch = referer.match(/\/(\w{2})[-/]/);
39
+ const cookieLocale = request.cookies.get('pz-locale')?.value;
41
40
 
42
- if (!localeMatch) {
43
- return null;
41
+ if (cookieLocale) {
42
+ const currentLocale = Settings.localization.locales.find(
43
+ (l) => l.value === cookieLocale
44
+ );
45
+ return currentLocale?.apiValue || null;
44
46
  }
45
47
 
46
- const localeValue = localeMatch[1];
47
- const currentLocale = Settings.localization.locales.find(
48
- (l) => l.value === localeValue
49
- );
50
-
51
- return currentLocale?.apiValue || null;
48
+ return null;
52
49
  }
53
50
 
54
51
  export async function GET(request: NextRequest) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akinon/next",
3
3
  "description": "Core package for Project Zero Next",
4
- "version": "1.103.0-snapshot-ZERO-3648-20251002184136",
4
+ "version": "1.103.0-snapshot-ZERO-3648-20251002191321",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -35,7 +35,7 @@
35
35
  "set-cookie-parser": "2.6.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@akinon/eslint-plugin-projectzero": "1.103.0-snapshot-ZERO-3648-20251002184136",
38
+ "@akinon/eslint-plugin-projectzero": "1.103.0-snapshot-ZERO-3648-20251002191321",
39
39
  "@babel/core": "7.26.10",
40
40
  "@babel/preset-env": "7.26.9",
41
41
  "@babel/preset-typescript": "7.27.0",