@vercel/next 4.15.24 → 4.15.25

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 +13 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14305,6 +14305,7 @@ async function serverBuild({
14305
14305
  afterFilesRewrites,
14306
14306
  fallbackRewrites,
14307
14307
  headers,
14308
+ onMatchHeaders,
14308
14309
  dataRoutes,
14309
14310
  hasIsr404Page,
14310
14311
  hasIsr500Page,
@@ -16307,6 +16308,7 @@ ${JSON.stringify(
16307
16308
  continue: true,
16308
16309
  important: true
16309
16310
  },
16311
+ ...onMatchHeaders,
16310
16312
  {
16311
16313
  src: import_path5.default.posix.join("/", entryDirectory, "/index(?:/)?"),
16312
16314
  headers: {
@@ -16714,7 +16716,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16714
16716
  }
16715
16717
  if (
16716
16718
  // integration tests expect outputs object
16717
- !process.env.NEXT_BUILDER_INTEGRATION && process.env.NEXT_ENABLE_ADAPTER && import_semver5.default.gte(nextVersion, MINIMUM_NEXT_ADAPTER_VERSION)
16719
+ !process.env.NEXT_BUILDER_INTEGRATION && process.env.NEXT_ENABLE_ADAPTER === "1" && import_semver5.default.gte(nextVersion, MINIMUM_NEXT_ADAPTER_VERSION)
16718
16720
  ) {
16719
16721
  env.NEXT_ADAPTER_PATH = import_path6.default.join(__dirname, "adapter/index.js");
16720
16722
  env.NEXT_ADAPTER_VERCEL_CONFIG = JSON.stringify(config);
@@ -16853,6 +16855,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16853
16855
  }
16854
16856
  );
16855
16857
  const headers = [];
16858
+ const onMatchHeaders = [];
16856
16859
  const beforeFilesRewrites = [];
16857
16860
  const afterFilesRewrites = [];
16858
16861
  const fallbackRewrites = [];
@@ -16917,6 +16920,9 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16917
16920
  if (routesManifest.headers) {
16918
16921
  headers.push(...(0, import_superstatic.convertHeaders)(routesManifest.headers));
16919
16922
  }
16923
+ if (routesManifest.onMatchHeaders) {
16924
+ onMatchHeaders.push(...(0, import_superstatic.convertHeaders)(routesManifest.onMatchHeaders));
16925
+ }
16920
16926
  if (import_semver5.default.gte(nextVersion, REDIRECTS_NO_STATIC_NEXT_VERSION)) {
16921
16927
  redirects.forEach(
16922
16928
  (r, i) => updateRouteSrc(r, i, routesManifest.redirects)
@@ -16945,6 +16951,9 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16945
16951
  headers.forEach(
16946
16952
  (r, i) => updateRouteSrc(r, i, routesManifest.headers || [])
16947
16953
  );
16954
+ onMatchHeaders.forEach(
16955
+ (r, i) => updateRouteSrc(r, i, routesManifest.onMatchHeaders || [])
16956
+ );
16948
16957
  }
16949
16958
  if (routesManifest.basePath && routesManifest.basePath !== "/") {
16950
16959
  const nextBasePath = routesManifest.basePath;
@@ -17172,6 +17181,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17172
17181
  continue: true,
17173
17182
  important: true
17174
17183
  },
17184
+ ...onMatchHeaders,
17175
17185
  // error handling
17176
17186
  ...output[import_path6.default.posix.join("./", entryDirectory, "404")] || output[import_path6.default.posix.join("./", entryDirectory, "404/index")] ? [
17177
17187
  { handle: "error" },
@@ -17479,6 +17489,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17479
17489
  isCorrectLocaleAPIRoutes,
17480
17490
  pagesDir,
17481
17491
  headers,
17492
+ onMatchHeaders,
17482
17493
  beforeFilesRewrites,
17483
17494
  afterFilesRewrites,
17484
17495
  fallbackRewrites,
@@ -18475,6 +18486,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18475
18486
  continue: true,
18476
18487
  important: true
18477
18488
  },
18489
+ ...onMatchHeaders,
18478
18490
  // error handling
18479
18491
  ...isLegacy ? [] : [
18480
18492
  // Custom Next.js 404 page
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.15.24",
3
+ "version": "4.15.25",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",