@akinon/next 1.47.0-rc.3 → 1.47.0-rc.4

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,5 +1,11 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.47.0-rc.4
4
+
5
+ ### Minor Changes
6
+
7
+ - 1ec2e9d: ZERO-2895: Update app-fetch to include cookies in headers
8
+
3
9
  ## 1.47.0-rc.3
4
10
 
5
11
  ## 1.47.0-rc.2
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.47.0-rc.3",
4
+ "version": "1.47.0-rc.4",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "set-cookie-parser": "2.6.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@akinon/eslint-plugin-projectzero": "1.47.0-rc.3",
33
+ "@akinon/eslint-plugin-projectzero": "1.47.0-rc.4",
34
34
  "@types/react-redux": "7.1.30",
35
35
  "@types/set-cookie-parser": "2.4.7",
36
36
  "@typescript-eslint/eslint-plugin": "6.7.4",
@@ -1,7 +1,7 @@
1
1
  import Settings from 'settings';
2
2
  import { ServerVariables } from './server-variables';
3
3
  import logger from '../utils/log';
4
- import { headers } from 'next/headers';
4
+ import { headers, cookies } from 'next/headers';
5
5
 
6
6
  export enum FetchResponseType {
7
7
  JSON = 'json',
@@ -19,6 +19,7 @@ const appFetch = async <T>(
19
19
 
20
20
  try {
21
21
  const nextHeaders = headers();
22
+ const nextCookies = cookies();
22
23
  ip = nextHeaders.get('x-forwarded-for') ?? '';
23
24
 
24
25
  const commerceUrl = Settings.commerceUrl;
@@ -37,7 +38,8 @@ const appFetch = async <T>(
37
38
  ...(init.headers ?? {}),
38
39
  'Accept-Language': currentLocale.apiValue,
39
40
  'x-currency': ServerVariables.currency,
40
- 'x-forwarded-for': ip
41
+ 'x-forwarded-for': ip,
42
+ cookie: nextCookies.toString()
41
43
  };
42
44
 
43
45
  init.next = {