@akinon/next 1.103.0-snapshot-ZERO-3648-20250930091244 → 1.103.0-snapshot-ZERO-3648-20251002084215

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-20250930091244
3
+ ## 1.103.0-snapshot-ZERO-3648-20251002084215
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -17,14 +17,19 @@ export async function GET(request: NextRequest) {
17
17
  if (endpoint === 'limited-categories') {
18
18
  const now = Date.now();
19
19
 
20
- if (limitedCategoriesCache && (now - limitedCategoriesCache.timestamp) < CACHE_TTL) {
20
+ if (
21
+ limitedCategoriesCache &&
22
+ now - limitedCategoriesCache.timestamp < CACHE_TTL
23
+ ) {
21
24
  return NextResponse.json(limitedCategoriesCache.data, {
22
25
  status: 200,
23
26
  headers: {
24
27
  'Access-Control-Allow-Origin': '*',
25
28
  'Access-Control-Allow-Methods': 'GET, POST, PUT, OPTIONS',
26
- 'Access-Control-Allow-Headers': 'Content-Type, Accept, Authorization',
27
- 'Cache-Control': 'public, s-maxage=3600, stale-while-revalidate=7200',
29
+ 'Access-Control-Allow-Headers':
30
+ 'Content-Type, Accept, Authorization',
31
+ 'Cache-Control':
32
+ 'public, s-maxage=3600, stale-while-revalidate=7200',
28
33
  'X-Virtual-Try-On-Cache-Status': 'HIT'
29
34
  }
30
35
  });
@@ -38,6 +43,9 @@ export async function GET(request: NextRequest) {
38
43
  Accept: 'application/json',
39
44
  ...(request.headers.get('authorization') && {
40
45
  Authorization: request.headers.get('authorization')!
46
+ }),
47
+ ...(request.headers.get('x-forwarded-for') && {
48
+ 'X-Forwarded-For': request.headers.get('x-forwarded-for')!
41
49
  })
42
50
  }
43
51
  });
@@ -97,6 +105,8 @@ export async function POST(request: NextRequest) {
97
105
 
98
106
  const httpMethod = endpoint === 'feedback' ? 'PUT' : 'POST';
99
107
 
108
+ const forwardedFor = request.headers.get('x-forwarded-for');
109
+
100
110
  const response = await fetch(externalUrl, {
101
111
  method: httpMethod,
102
112
  headers: {
@@ -104,6 +114,9 @@ export async function POST(request: NextRequest) {
104
114
  ...(httpMethod === 'POST' && { Accept: 'application/json' }),
105
115
  ...(request.headers.get('authorization') && {
106
116
  Authorization: request.headers.get('authorization')!
117
+ }),
118
+ ...(request.headers.get('x-forwarded-for') && {
119
+ 'X-Forwarded-For': request.headers.get('x-forwarded-for')!
107
120
  })
108
121
  },
109
122
  body: JSON.stringify(body)
@@ -200,6 +213,9 @@ export async function PUT(request: NextRequest) {
200
213
  'Content-Type': 'application/json',
201
214
  ...(request.headers.get('authorization') && {
202
215
  Authorization: request.headers.get('authorization')!
216
+ }),
217
+ ...(request.headers.get('x-forwarded-for') && {
218
+ 'X-Forwarded-For': request.headers.get('x-forwarded-for')!
203
219
  })
204
220
  },
205
221
  body: JSON.stringify(body)
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-20250930091244",
4
+ "version": "1.103.0-snapshot-ZERO-3648-20251002084215",
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-20250930091244",
38
+ "@akinon/eslint-plugin-projectzero": "1.103.0-snapshot-ZERO-3648-20251002084215",
39
39
  "@babel/core": "7.26.10",
40
40
  "@babel/preset-env": "7.26.9",
41
41
  "@babel/preset-typescript": "7.27.0",