@vercel/next 4.16.5 → 4.16.6

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.
@@ -10362,6 +10362,26 @@ function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataReso
10362
10362
  const basePath = config.basePath || "";
10363
10363
  const trailingSlash = config.trailingSlash || false;
10364
10364
  return [
10365
+ // remove x-nextjs-data header for non _next/data requests
10366
+ {
10367
+ src: path3.posix.join("/", basePath, "/(?!_next/data(?:/|$))(.*)"),
10368
+ has: [
10369
+ {
10370
+ type: "header",
10371
+ key: "x-nextjs-data"
10372
+ }
10373
+ ],
10374
+ transforms: [
10375
+ {
10376
+ type: "request.headers",
10377
+ op: "delete",
10378
+ target: {
10379
+ key: "x-nextjs-data"
10380
+ }
10381
+ }
10382
+ ],
10383
+ continue: true
10384
+ },
10365
10385
  // ensure x-nextjs-data header is always present if we are doing middleware next data resolving
10366
10386
  {
10367
10387
  src: path3.posix.join("/", basePath, "/_next/data/(.*)"),
package/dist/index.js CHANGED
@@ -15722,6 +15722,30 @@ ${JSON.stringify(
15722
15722
  ...trailingSlashRedirects,
15723
15723
  ...privateOutputs.routes,
15724
15724
  ...isNextDataServerResolving ? [
15725
+ // remove x-nextjs-data header for non _next/data requests
15726
+ {
15727
+ src: import_path5.default.posix.join(
15728
+ "/",
15729
+ entryDirectory,
15730
+ "/(?!_next/data(?:/|$))(.*)"
15731
+ ),
15732
+ has: [
15733
+ {
15734
+ type: "header",
15735
+ key: "x-nextjs-data"
15736
+ }
15737
+ ],
15738
+ transforms: [
15739
+ {
15740
+ type: "request.headers",
15741
+ op: "delete",
15742
+ target: {
15743
+ key: "x-nextjs-data"
15744
+ }
15745
+ }
15746
+ ],
15747
+ continue: true
15748
+ },
15725
15749
  // ensure x-nextjs-data header is always present
15726
15750
  // if we are doing middleware next data resolving
15727
15751
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.16.5",
3
+ "version": "4.16.6",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -16,7 +16,7 @@
16
16
  "@vercel/nft": "1.5.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@next-community/adapter-vercel": "0.0.1-beta.16",
19
+ "@next-community/adapter-vercel": "0.0.1-beta.17",
20
20
  "@types/aws-lambda": "8.10.19",
21
21
  "@types/buffer-crc32": "0.2.0",
22
22
  "@types/bytes": "3.1.1",
@@ -53,7 +53,7 @@
53
53
  "test-listen": "1.1.0",
54
54
  "text-table": "0.2.0",
55
55
  "webpack-sources": "3.2.3",
56
- "@vercel/build-utils": "13.12.2",
56
+ "@vercel/build-utils": "13.14.2",
57
57
  "@vercel/routing-utils": "6.1.1"
58
58
  },
59
59
  "scripts": {