@next-community/adapter-vercel 0.0.1-beta.16 → 0.0.1-beta.17

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-community/adapter-vercel",
3
- "version": "0.0.1-beta.16",
3
+ "version": "0.0.1-beta.17",
4
4
  "type": "commonjs",
5
5
  "main": "dist/index.js",
6
6
  "files": [