Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new permanentRedirect function in App Router #54047

Merged
merged 17 commits into from Aug 28, 2023

Conversation

smaeda-ks
Copy link
Member

@smaeda-ks smaeda-ks commented Aug 15, 2023

for internal: https://vercel.slack.com/archives/C03S8ED1DKM/p1691700057242999

Problem

  • The existing redirect() function can't control the status code.
  • The existing redirect() function returns a 307 HTTP redirect response while it returns a 308-equivalent meta tag <meta http-equiv="refresh" content="0;url=/foo"/> in streaming response (e.g., suspense boundary), making the behavior inconsistent.

Solution

Adding a new permanentRedirect() function and changing the meta tag default accordingly.

func HTTP status meta tag
redirect() 307 <meta http-equiv="refresh" content="1;url=/foo"/>
permanentRedirect() 308 <meta http-equiv="refresh" content="0;url=/foo"/>

ref. https://developers.google.com/search/docs/crawling-indexing/301-redirects

@ijjk
Copy link
Member

ijjk commented Aug 15, 2023

Allow CI Workflow Run

  • approve CI run for commit: 8d28f91

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@ijjk
Copy link
Member

ijjk commented Aug 15, 2023

Allow CI Workflow Run

  • approve CI run for commit: 6053d9c

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@smaeda-ks smaeda-ks marked this pull request as ready for review August 15, 2023 14:11
@williamli
Copy link
Contributor

Please reach out to owner of case 150213 (ENT) once this feature has been implemented.

@smaeda-ks
Copy link
Member Author

@ijjk can we enable CI?

@ijjk ijjk added the CI approved Approve running CI for fork label Aug 17, 2023
@ijjk
Copy link
Member

ijjk commented Aug 17, 2023

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary smaeda-ks/next.js shohei/add-permanent-redirect-option Change
buildDuration 14.8s 15s ⚠️ +163ms
buildDurationCached 7.2s 6.8s -387ms
nodeModulesSize 136 MB 136 MB ⚠️ +12.6 kB
nextStartRea..uration (ms) 429ms 427ms -2ms
Client Bundles (main, webpack) Overall increase ⚠️
vercel/next.js canary smaeda-ks/next.js shohei/add-permanent-redirect-option Change
3f784ff6-HASH.js gzip 50.6 kB 50.6 kB
418-HASH.js gzip 26.3 kB 26.3 kB ⚠️ +34 B
951.HASH.js gzip 181 B 181 B
framework-HASH.js gzip 45.2 kB 45.2 kB
main-app-HASH.js gzip 223 B 223 B
main-HASH.js gzip 29.5 kB 29.5 kB ⚠️ +24 B
webpack-HASH.js gzip 1.7 kB 1.7 kB -1 B
Overall change 154 kB 154 kB ⚠️ +57 B
Legacy Client Bundles (polyfills)
vercel/next.js canary smaeda-ks/next.js shohei/add-permanent-redirect-option Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages Overall increase ⚠️
vercel/next.js canary smaeda-ks/next.js shohei/add-permanent-redirect-option Change
_app-HASH.js gzip 194 B 195 B ⚠️ +1 B
_error-HASH.js gzip 182 B 181 B -1 B
amp-HASH.js gzip 506 B 505 B -1 B
css-HASH.js gzip 322 B 322 B
dynamic-HASH.js gzip 2.5 kB 2.5 kB ⚠️ +2 B
edge-ssr-HASH.js gzip 256 B 255 B -1 B
head-HASH.js gzip 350 B 350 B
hooks-HASH.js gzip 369 B 369 B
image-HASH.js gzip 4.3 kB 4.3 kB
index-HASH.js gzip 255 B 256 B ⚠️ +1 B
link-HASH.js gzip 2.62 kB 2.62 kB
routerDirect..HASH.js gzip 311 B 311 B
script-HASH.js gzip 384 B 384 B
withRouter-HASH.js gzip 307 B 307 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 13 kB 13 kB ⚠️ +1 B
Client Build Manifests Overall increase ⚠️
vercel/next.js canary smaeda-ks/next.js shohei/add-permanent-redirect-option Change
_buildManifest.js gzip 482 B 485 B ⚠️ +3 B
Overall change 482 B 485 B ⚠️ +3 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary smaeda-ks/next.js shohei/add-permanent-redirect-option Change
index.html gzip 510 B 512 B ⚠️ +2 B
link.html gzip 524 B 527 B ⚠️ +3 B
withRouter.html gzip 504 B 506 B ⚠️ +2 B
Overall change 1.54 kB 1.54 kB ⚠️ +7 B
Edge SSR bundle Size Overall increase ⚠️
vercel/next.js canary smaeda-ks/next.js shohei/add-permanent-redirect-option Change
edge-ssr.js gzip 90.4 kB 90.5 kB ⚠️ +13 B
page.js gzip 150 kB 150 kB ⚠️ +102 B
Overall change 240 kB 240 kB ⚠️ +115 B
Middleware size Overall increase ⚠️
vercel/next.js canary smaeda-ks/next.js shohei/add-permanent-redirect-option Change
middleware-b..fest.js gzip 622 B 624 B ⚠️ +2 B
middleware-r..fest.js gzip 150 B 149 B -1 B
middleware.js gzip 22.8 kB 22.8 kB ⚠️ +3 B
edge-runtime..pack.js gzip 1.83 kB 1.83 kB
Overall change 25.4 kB 25.4 kB ⚠️ +4 B

Diffs

Diff for page.js

Diff too large to display

Diff for middleware-b..-manifest.js
@@ -7,96 +7,96 @@ self.__BUILD_MANIFEST = {
     "static/BUILD_ID/_ssgManifest.js",
   ],
   rootMainFiles: [
-    "static/chunks/webpack-50d000e85c50e09b.js",
-    "static/chunks/3f784ff6-da0a09695b73168d.js",
-    "static/chunks/418-2d8217709c2ff16f.js",
-    "static/chunks/main-app-f42932e6cff33e8b.js",
+    "static/chunks/webpack-4d2814744c68556e.js",
+    "static/chunks/3c4a14c2-0e452fddd205c196.js",
+    "static/chunks/26-0154e028148d12b0.js",
+    "static/chunks/main-app-aaa893e309f918d6.js",
   ],
   pages: {
     "/": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/index-0c70b5cac8e37aad.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/index-e4fa21067c6620fd.js",
     ],
     "/_app": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/_app-7b0080dfb0361625.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/_app-e006aa4d459cf5bd.js",
     ],
     "/_error": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/_error-ba30dba8e50debd2.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/_error-958ed5e29926926f.js",
     ],
     "/amp": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/amp-224ab03fd3be15dd.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/amp-a4252964621de9b2.js",
     ],
     "/css": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
       "static/css/ded6b86ab9cc0a1f.css",
-      "static/chunks/pages/css-6c71600115a694e9.js",
+      "static/chunks/pages/css-ac28f4b6ac30b9b7.js",
     ],
     "/dynamic": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/dynamic-e7d74ef8615ad605.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/dynamic-aaf2e235a0c52102.js",
     ],
     "/edge-ssr": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/edge-ssr-3cfd16864a3cfa0a.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/edge-ssr-6b594baca99d6827.js",
     ],
     "/head": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/head-a665592322072341.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/head-79e900abe9b59c55.js",
     ],
     "/hooks": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/hooks-357c5e93d051acf2.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/hooks-6d4d9e43d663c504.js",
     ],
     "/image": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/image-f8d4a75d00eca4ca.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/image-62d89c5628389371.js",
     ],
     "/link": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/link-91a07e69e1ca75d3.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/link-1320719f1f584741.js",
     ],
     "/routerDirect": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/routerDirect-03d5387edf6d344e.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/routerDirect-8055f28938435959.js",
     ],
     "/script": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/script-79419b9cd4cdf1e0.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/script-be233771a424b435.js",
     ],
     "/withRouter": [
-      "static/chunks/webpack-50d000e85c50e09b.js",
+      "static/chunks/webpack-4d2814744c68556e.js",
       "static/chunks/framework-114cbddc60b679b8.js",
-      "static/chunks/main-1b9c93b038fa314d.js",
-      "static/chunks/pages/withRouter-8ddeba917c22a948.js",
+      "static/chunks/main-d30785853d3ce8c3.js",
+      "static/chunks/pages/withRouter-8238a98becd29f4d.js",
     ],
   },
   ampFirstPages: [],
Diff for middleware-r..-manifest.js
@@ -1,2 +1,2 @@
 self.__REACT_LOADABLE_MANIFEST =
-  '{"dynamic.js -> ../components/hello":{"id":4951,"files":["static/chunks/951.c0220e3a07c41dc5.js"]}}';
+  '{"dynamic.js -> ../components/hello":{"id":3993,"files":["static/chunks/993.ee8f782902686538.js"]}}';
Diff for middleware.js
@@ -2,7 +2,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [826],
   {
-    /***/ 2722: /***/ (
+    /***/ 7136: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -22,7 +22,7 @@
       __webpack_require__.r(middleware_namespaceObject);
       __webpack_require__.d(middleware_namespaceObject, {
         default: () => middleware,
-      }); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/globals.js
+      }); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/globals.js
 
       async function registerInstrumentation() {
         if (
@@ -92,7 +92,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         // Eagerly fire instrumentation hook to make the startup faster.
         void ensureInstrumentationRegistered();
       }
-      enhanceGlobals(); //# sourceMappingURL=globals.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/error.js
+      enhanceGlobals(); //# sourceMappingURL=globals.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/error.js
 
       class PageSignatureError extends Error {
         constructor({ page }) {
@@ -119,7 +119,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
   Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
   `);
         }
-      } //# sourceMappingURL=error.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/utils.js
+      } //# sourceMappingURL=error.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/utils.js
 
       /**
        * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any
@@ -254,7 +254,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
             }
           );
         }
-      } //# sourceMappingURL=utils.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js
+      } //# sourceMappingURL=utils.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/fetch-event.js
 
       const responseSymbol = Symbol("response");
       const passThroughSymbol = Symbol("passThrough");
@@ -300,7 +300,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
             page: this.sourcePage,
           });
         }
-      } //# sourceMappingURL=fetch-event.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js
+      } //# sourceMappingURL=fetch-event.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/i18n/detect-domain-locale.js
 
       function detectDomainLocale(domainItems, hostname, detectedLocale) {
         if (!domainItems) return;
@@ -326,7 +326,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
             return item;
           }
         }
-      } //# sourceMappingURL=detect-domain-locale.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js
+      } //# sourceMappingURL=detect-domain-locale.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/remove-trailing-slash.js
 
       /**
        * Removes the trailing slash for a given route or page path. Preserves the
@@ -336,7 +336,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
        *   - `/` -> `/`
        */ function removeTrailingSlash(route) {
         return route.replace(/\/$/, "") || "/";
-      } //# sourceMappingURL=remove-trailing-slash.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js
+      } //# sourceMappingURL=remove-trailing-slash.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/parse-path.js
 
       /**
        * Given a path this function will find the pathname, query and hash and return
@@ -364,7 +364,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
           query: "",
           hash: "",
         };
-      } //# sourceMappingURL=parse-path.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js
+      } //# sourceMappingURL=parse-path.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/add-path-prefix.js
 
       /**
        * Adds the provided prefix to the given path. It first ensures that the path
@@ -375,7 +375,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         }
         const { pathname, query, hash } = parsePath(path);
         return "" + prefix + pathname + query + hash;
-      } //# sourceMappingURL=add-path-prefix.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js
+      } //# sourceMappingURL=add-path-prefix.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/add-path-suffix.js
 
       /**
        * Similarly to `addPathPrefix`, this function adds a suffix at the end on the
@@ -387,7 +387,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         }
         const { pathname, query, hash } = parsePath(path);
         return "" + pathname + suffix + query + hash;
-      } //# sourceMappingURL=add-path-suffix.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js
+      } //# sourceMappingURL=add-path-suffix.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/path-has-prefix.js
 
       /**
        * Checks if a given path starts with a given prefix. It ensures it matches
@@ -401,7 +401,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         }
         const { pathname } = parsePath(path);
         return pathname === prefix || pathname.startsWith(prefix + "/");
-      } //# sourceMappingURL=path-has-prefix.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js
+      } //# sourceMappingURL=path-has-prefix.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/add-locale.js
 
       /**
        * For a given path and a locale, if the locale is given, it will prefix the
@@ -420,7 +420,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         }
         // Add the locale prefix to the path.
         return addPathPrefix(path, "/" + locale);
-      } //# sourceMappingURL=add-locale.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js
+      } //# sourceMappingURL=add-locale.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/format-next-pathname-info.js
 
       function formatNextPathnameInfo(info) {
         let pathname = addLocale(
@@ -444,7 +444,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
             ? addPathSuffix(pathname, "/")
             : pathname
           : removeTrailingSlash(pathname);
-      } //# sourceMappingURL=format-next-pathname-info.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/get-hostname.js
+      } //# sourceMappingURL=format-next-pathname-info.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/get-hostname.js
 
       /**
        * Takes an object with a hostname property (like a parsed URL) and some
@@ -464,7 +464,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
           hostname = parsed.hostname;
         } else return;
         return hostname.toLowerCase();
-      } //# sourceMappingURL=get-hostname.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js
+      } //# sourceMappingURL=get-hostname.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/i18n/normalize-locale-path.js
 
       /**
        * For a pathname that may include a locale from a list of locales, it
@@ -494,7 +494,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
           pathname,
           detectedLocale,
         };
-      } //# sourceMappingURL=normalize-locale-path.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js
+      } //# sourceMappingURL=normalize-locale-path.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/remove-path-prefix.js
 
       /**
        * Given a path and a prefix it will remove the prefix when it exists in the
@@ -528,7 +528,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         // If the path without the prefix doesn't start with a `/` we need to add it
         // back to the path to make sure it's a valid path.
         return "/" + withoutPrefix;
-      } //# sourceMappingURL=remove-path-prefix.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js
+      } //# sourceMappingURL=remove-path-prefix.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/get-next-pathname-info.js
 
       function getNextPathnameInfo(pathname, options) {
         var _options_nextConfig;
@@ -586,7 +586,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
           }
         }
         return info;
-      } //# sourceMappingURL=get-next-pathname-info.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/next-url.js
+      } //# sourceMappingURL=get-next-pathname-info.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/next-url.js
 
       const REGEX_LOCALHOST_HOSTNAME =
         /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;
@@ -813,8 +813,8 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         }
       } //# sourceMappingURL=next-url.js.map
 
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js
-      var _edge_runtime_cookies = __webpack_require__(2199); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/cookies.js // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/request.js
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js
+      var _edge_runtime_cookies = __webpack_require__(1129); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/cookies.js // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/request.js
       //# sourceMappingURL=cookies.js.map
 
       const INTERNALS = Symbol("internal request");
@@ -891,7 +891,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         get url() {
           return this[INTERNALS].url;
         }
-      } //# sourceMappingURL=request.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/response.js
+      } //# sourceMappingURL=request.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/response.js
 
       const response_INTERNALS = Symbol("internal response");
       const REDIRECTS = new Set([301, 302, 303, 307, 308]);
@@ -990,7 +990,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
             headers,
           });
         }
-      } //# sourceMappingURL=response.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js
+      } //# sourceMappingURL=response.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/relativize-url.js
 
       /**
        * Given a URL as a string and a base URL it will make the URL relative
@@ -1003,7 +1003,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         return relative.protocol + "//" + relative.host === origin
           ? relative.toString().replace(origin, "")
           : relative.toString();
-      } //# sourceMappingURL=relativize-url.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/client/components/app-router-headers.js
+      } //# sourceMappingURL=relativize-url.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/client/components/app-router-headers.js
 
       const RSC = "RSC";
       const ACTION = "Next-Action";
@@ -1025,7 +1025,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         [NEXT_ROUTER_STATE_TREE],
         [NEXT_ROUTER_PREFETCH],
       ];
-      const NEXT_RSC_UNION_QUERY = "_rsc"; //# sourceMappingURL=app-router-headers.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/internal-utils.js
+      const NEXT_RSC_UNION_QUERY = "_rsc"; //# sourceMappingURL=app-router-headers.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/internal-utils.js
 
       const INTERNAL_QUERY_NAMES = [
         "__nextFallback",
@@ -1053,7 +1053,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
           }
         }
         return isStringUrl ? instance.toString() : instance;
-      } //# sourceMappingURL=internal-utils.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js
+      } //# sourceMappingURL=internal-utils.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js
 
       /**
        * Normalizes an app route so it represents the actual request path. Essentially
@@ -1104,7 +1104,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
        * Since this function is used on full urls it checks `?` for searchParams handling.
        */ function normalizeRscPath(pathname, enabled) {
         return enabled ? pathname.replace(/\.rsc($|\?)/, "$1") : pathname;
-      } //# sourceMappingURL=app-paths.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/lib/constants.js
+      } //# sourceMappingURL=app-paths.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/lib/constants.js
 
       const NEXT_QUERY_PARAM_PREFIX = "nxtP";
       const PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
@@ -1239,7 +1239,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         metadata: "__next_metadata__",
         metadataRoute: "__next_metadata_route__",
         metadataImageMeta: "__next_metadata_image_meta__",
-      }; //# sourceMappingURL=constants.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js
+      }; //# sourceMappingURL=constants.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js
 
       class ReflectAdapter {
         static get(target, prop, receiver) {
@@ -1258,7 +1258,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         static deleteProperty(target, prop) {
           return Reflect.deleteProperty(target, prop);
         }
-      } //# sourceMappingURL=reflect.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js
+      } //# sourceMappingURL=reflect.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/adapters/headers.js
 
       /**
        * @internal
@@ -1439,7 +1439,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         [Symbol.iterator]() {
           return this.entries();
         }
-      } //# sourceMappingURL=headers.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js
+      } //# sourceMappingURL=headers.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/spec-extension/adapters/request-cookies.js
 
       /**
        * @internal
@@ -1572,7 +1572,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
             },
           });
         }
-      } //# sourceMappingURL=request-cookies.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/api-utils/index.js
+      } //# sourceMappingURL=request-cookies.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/api-utils/index.js
 
       /**
        * Parse cookies from the `headers` of request
@@ -1583,7 +1583,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
           if (!cookie) {
             return {};
           }
-          const { parse: parseCookieFn } = __webpack_require__(3826);
+          const { parse: parseCookieFn } = __webpack_require__(3799);
           return parseCookieFn(
             Array.isArray(cookie) ? cookie.join("; ") : cookie
           );
@@ -1642,7 +1642,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         if (SYMBOL_CLEARED_COOKIES in res) {
           return res;
         }
-        const { serialize } = __webpack_require__(3826);
+        const { serialize } = __webpack_require__(3799);
         const previous = res.getHeader("Set-Cookie");
         res.setHeader(`Set-Cookie`, [
           ...(typeof previous === "string"
@@ -1739,7 +1739,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
             });
           },
         });
-      } //# sourceMappingURL=index.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js
+      } //# sourceMappingURL=index.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/async-storage/draft-mode-provider.js
 
       class DraftModeProvider {
         constructor(previewProps, req, cookies, mutableCookies) {
@@ -1792,7 +1792,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
             expires: new Date(0),
           });
         }
-      } //# sourceMappingURL=draft-mode-provider.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/async-storage/request-async-storage-wrapper.js
+      } //# sourceMappingURL=draft-mode-provider.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/async-storage/request-async-storage-wrapper.js
 
       function getHeaders(headers) {
         const cleaned = HeadersAdapter.from(headers);
@@ -1877,10 +1877,10 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
         },
       }; //# sourceMappingURL=request-async-storage-wrapper.js.map
 
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/client/components/async-local-storage.js
-      var async_local_storage = __webpack_require__(4035); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/client/components/request-async-storage.js
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/client/components/async-local-storage.js
+      var async_local_storage = __webpack_require__(2766); // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/client/components/request-async-storage.js
       const requestAsyncStorage = (0,
-      async_local_storage /* createAsyncLocalStorage */.P)(); //# sourceMappingURL=request-async-storage.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/adapter.js
+      async_local_storage /* createAsyncLocalStorage */.P)(); //# sourceMappingURL=request-async-storage.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/adapter.js
 
       class NextRequestHint extends NextRequest {
         constructor(params) {
@@ -2142,14 +2142,14 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
           response: finalResponse,
           waitUntil: Promise.all(event[waitUntilSymbol]),
         };
-      } //# sourceMappingURL=adapter.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/exports/next-response.js // CONCATENATED MODULE: ./middleware.js
+      } //# sourceMappingURL=adapter.js.map // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/esm/server/web/exports/next-response.js // CONCATENATED MODULE: ./middleware.js
 
       // This file is for modularized imports for next/server to get fully-treeshaking.
       //# sourceMappingURL=next-response.js.map
 
       async function middleware() {
         return NextResponse.next();
-      } // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fmiddleware.js&page=%2Fmiddleware&rootDir=%2Ftmp%2Fnext-statsNLNO3t%2Fstats-app&matchers=&preferredRegion=&middlewareConfig=e30%3D!
+      } // CONCATENATED MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js?absolutePagePath=private-next-root-dir%2Fmiddleware.js&page=%2Fmiddleware&rootDir=%2Ftmp%2Fnext-statsNLNO3t%2Fstats-app&matchers=&preferredRegion=&middlewareConfig=e30%3D!
 
       const mod = { ...middleware_namespaceObject };
       const handler = mod.middleware || mod.default;
@@ -2173,7 +2173,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 2199: /***/ (module) => {
+    /***/ 1129: /***/ (module) => {
       "use strict";
 
       var __defProp = Object.defineProperty;
@@ -2578,7 +2578,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 3826: /***/ (module) => {
+    /***/ 3799: /***/ (module) => {
       "use strict";
       var __dirname = "/";
 
@@ -2708,7 +2708,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
       /***/
     },
 
-    /***/ 4035: /***/ (
+    /***/ 2766: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -2754,7 +2754,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
-    /******/ var __webpack_exports__ = __webpack_exec__(2722);
+    /******/ var __webpack_exports__ = __webpack_exec__(7136);
     /******/ (_ENTRIES =
       typeof _ENTRIES === "undefined" ? {} : _ENTRIES).middleware_middleware =
       __webpack_exports__;
Diff for edge-ssr.js

Diff too large to display

Diff for _buildManifest.js
@@ -1,28 +1,28 @@
 self.__BUILD_MANIFEST = {
   __rewrites: { afterFiles: [], beforeFiles: [], fallback: [] },
-  "/": ["static\u002Fchunks\u002Fpages\u002Findex-0c70b5cac8e37aad.js"],
-  "/_error": ["static\u002Fchunks\u002Fpages\u002F_error-ba30dba8e50debd2.js"],
-  "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-224ab03fd3be15dd.js"],
+  "/": ["static\u002Fchunks\u002Fpages\u002Findex-e4fa21067c6620fd.js"],
+  "/_error": ["static\u002Fchunks\u002Fpages\u002F_error-958ed5e29926926f.js"],
+  "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-a4252964621de9b2.js"],
   "/css": [
     "static\u002Fcss\u002Fded6b86ab9cc0a1f.css",
-    "static\u002Fchunks\u002Fpages\u002Fcss-6c71600115a694e9.js",
+    "static\u002Fchunks\u002Fpages\u002Fcss-ac28f4b6ac30b9b7.js",
   ],
   "/dynamic": [
-    "static\u002Fchunks\u002Fpages\u002Fdynamic-e7d74ef8615ad605.js",
+    "static\u002Fchunks\u002Fpages\u002Fdynamic-aaf2e235a0c52102.js",
   ],
   "/edge-ssr": [
-    "static\u002Fchunks\u002Fpages\u002Fedge-ssr-3cfd16864a3cfa0a.js",
+    "static\u002Fchunks\u002Fpages\u002Fedge-ssr-6b594baca99d6827.js",
   ],
-  "/head": ["static\u002Fchunks\u002Fpages\u002Fhead-a665592322072341.js"],
-  "/hooks": ["static\u002Fchunks\u002Fpages\u002Fhooks-357c5e93d051acf2.js"],
-  "/image": ["static\u002Fchunks\u002Fpages\u002Fimage-f8d4a75d00eca4ca.js"],
-  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-91a07e69e1ca75d3.js"],
+  "/head": ["static\u002Fchunks\u002Fpages\u002Fhead-79e900abe9b59c55.js"],
+  "/hooks": ["static\u002Fchunks\u002Fpages\u002Fhooks-6d4d9e43d663c504.js"],
+  "/image": ["static\u002Fchunks\u002Fpages\u002Fimage-62d89c5628389371.js"],
+  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-1320719f1f584741.js"],
   "/routerDirect": [
-    "static\u002Fchunks\u002Fpages\u002FrouterDirect-03d5387edf6d344e.js",
+    "static\u002Fchunks\u002Fpages\u002FrouterDirect-8055f28938435959.js",
   ],
-  "/script": ["static\u002Fchunks\u002Fpages\u002Fscript-79419b9cd4cdf1e0.js"],
+  "/script": ["static\u002Fchunks\u002Fpages\u002Fscript-be233771a424b435.js"],
   "/withRouter": [
-    "static\u002Fchunks\u002Fpages\u002FwithRouter-8ddeba917c22a948.js",
+    "static\u002Fchunks\u002Fpages\u002FwithRouter-8238a98becd29f4d.js",
   ],
   sortedPages: [
     "\u002F",
Diff for _app-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [888],
   {
-    /***/ 7108: /***/ function (
+    /***/ 1424: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/_app",
         function () {
-          return __webpack_require__(4077);
+          return __webpack_require__(4325);
         },
       ]);
       if (false) {
@@ -24,7 +24,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 179], function () {
-      return __webpack_exec__(7108), __webpack_exec__(6079);
+      return __webpack_exec__(1424), __webpack_exec__(7576);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for _error-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [820],
   {
-    /***/ 2665: /***/ function (
+    /***/ 630: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/_error",
         function () {
-          return __webpack_require__(7364);
+          return __webpack_require__(1401);
         },
       ]);
       if (false) {
@@ -24,7 +24,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [888, 774, 179], function () {
-      return __webpack_exec__(2665);
+      return __webpack_exec__(630);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for amp-HASH.js
@@ -1,17 +1,17 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [216],
   {
-    /***/ 1571: /***/ function (
+    /***/ 1158: /***/ function (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(5964);
+      module.exports = __webpack_require__(6964);
 
       /***/
     },
 
-    /***/ 4273: /***/ function (
+    /***/ 8255: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -19,7 +19,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/amp",
         function () {
-          return __webpack_require__(3679);
+          return __webpack_require__(6300);
         },
       ]);
       if (false) {
@@ -28,7 +28,7 @@
       /***/
     },
 
-    /***/ 5964: /***/ function (module, exports, __webpack_require__) {
+    /***/ 6964: /***/ function (module, exports, __webpack_require__) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -44,8 +44,8 @@
       const _react = /*#__PURE__*/ _interop_require_default._(
         __webpack_require__(959)
       );
-      const _ampcontext = __webpack_require__(130);
-      const _ampmode = __webpack_require__(2221);
+      const _ampcontext = __webpack_require__(4200);
+      const _ampmode = __webpack_require__(6410);
       function useAmp() {
         // Don't assign the context value to a variable to save bytes
         return (0, _ampmode.isInAmpMode)(
@@ -67,7 +67,7 @@
       /***/
     },
 
-    /***/ 3679: /***/ function (
+    /***/ 6300: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -84,7 +84,7 @@
         /* harmony export */
       });
       /* harmony import */ var next_amp__WEBPACK_IMPORTED_MODULE_0__ =
-        __webpack_require__(1571);
+        __webpack_require__(1158);
       /* harmony import */ var next_amp__WEBPACK_IMPORTED_MODULE_0___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_amp__WEBPACK_IMPORTED_MODULE_0__
@@ -108,7 +108,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [888, 774, 179], function () {
-      return __webpack_exec__(4273);
+      return __webpack_exec__(8255);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for css-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [706],
   {
-    /***/ 2094: /***/ function (
+    /***/ 2714: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/css",
         function () {
-          return __webpack_require__(4582);
+          return __webpack_require__(8697);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 4582: /***/ function (
+    /***/ 8697: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -28,7 +28,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(1527);
       /* harmony import */ var _css_module_css__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(7809);
+        __webpack_require__(7782);
       /* harmony import */ var _css_module_css__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           _css_module_css__WEBPACK_IMPORTED_MODULE_1__
@@ -48,7 +48,7 @@
       /***/
     },
 
-    /***/ 7809: /***/ function (module) {
+    /***/ 7782: /***/ function (module) {
       // extracted by mini-css-extract-plugin
       module.exports = { helloWorld: "css_helloWorld__aUdUq" };
 
@@ -61,7 +61,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function () {
-      return __webpack_exec__(2094);
+      return __webpack_exec__(2714);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for dynamic-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [739],
   {
-    /***/ 8484: /***/ function (
+    /***/ 9816: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/dynamic",
         function () {
-          return __webpack_require__(9373);
+          return __webpack_require__(1256);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 5526: /***/ function (module, exports, __webpack_require__) {
+    /***/ 1061: /***/ function (module, exports, __webpack_require__) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -45,7 +45,7 @@
         __webpack_require__(959)
       );
       const _loadable = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(8783)
+        __webpack_require__(3475)
       );
       const isServerSide = "object" === "undefined";
       // Normalize loader to return the module as form { default: Component } for `React.lazy`.
@@ -146,7 +146,7 @@
       /***/
     },
 
-    /***/ 8279: /***/ function (
+    /***/ 1306: /***/ function (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -173,7 +173,7 @@
       /***/
     },
 
-    /***/ 8783: /***/ function (
+    /***/ 3475: /***/ function (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -215,7 +215,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
       const _react = /*#__PURE__*/ _interop_require_default._(
         __webpack_require__(959)
       );
-      const _loadablecontext = __webpack_require__(8279);
+      const _loadablecontext = __webpack_require__(1306);
       function resolve(obj) {
         return obj && obj.default ? obj.default : obj;
       }
@@ -450,7 +450,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
       /***/
     },
 
-    /***/ 9373: /***/ function (
+    /***/ 1256: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -466,7 +466,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(1527);
       /* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(5620);
+        __webpack_require__(4438);
       /* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_dynamic__WEBPACK_IMPORTED_MODULE_1__
@@ -475,11 +475,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
       const DynamicHello = next_dynamic__WEBPACK_IMPORTED_MODULE_1___default()(
         () =>
           __webpack_require__
-            .e(/* import() */ 951)
-            .then(__webpack_require__.bind(__webpack_require__, 4951)),
+            .e(/* import() */ 993)
+            .then(__webpack_require__.bind(__webpack_require__, 3993)),
         {
           loadableGenerated: {
-            webpack: () => [/*require.resolve*/ 4951],
+            webpack: () => [/*require.resolve*/ 3993],
           },
         }
       );
@@ -506,12 +506,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
       /***/
     },
 
-    /***/ 5620: /***/ function (
+    /***/ 4438: /***/ function (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(5526);
+      module.exports = __webpack_require__(1061);
 
       /***/
     },
@@ -522,7 +522,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function () {
-      return __webpack_exec__(8484);
+      return __webpack_exec__(9816);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for edge-ssr-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [800],
   {
-    /***/ 9835: /***/ function (
+    /***/ 7423: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/edge-ssr",
         function () {
-          return __webpack_require__(4232);
+          return __webpack_require__(2970);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 4232: /***/ function (
+    /***/ 2970: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -48,7 +48,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [888, 774, 179], function () {
-      return __webpack_exec__(9835);
+      return __webpack_exec__(7423);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for head-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [645],
   {
-    /***/ 3365: /***/ function (
+    /***/ 4278: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/head",
         function () {
-          return __webpack_require__(4050);
+          return __webpack_require__(4391);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 4050: /***/ function (
+    /***/ 4391: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -34,7 +34,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(1527);
       /* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(2022);
+        __webpack_require__(4469);
       /* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_head__WEBPACK_IMPORTED_MODULE_1__
@@ -68,12 +68,12 @@
       /***/
     },
 
-    /***/ 2022: /***/ function (
+    /***/ 4469: /***/ function (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(3453);
+      module.exports = __webpack_require__(4372);
 
       /***/
     },
@@ -84,7 +84,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function () {
-      return __webpack_exec__(3365);
+      return __webpack_exec__(4278);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for hooks-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [757],
   {
-    /***/ 5315: /***/ function (
+    /***/ 5046: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/hooks",
         function () {
-          return __webpack_require__(8218);
+          return __webpack_require__(3710);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 8218: /***/ function (
+    /***/ 3710: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -79,7 +79,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function () {
-      return __webpack_exec__(5315);
+      return __webpack_exec__(5046);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for image-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [358],
   {
-    /***/ 1552: /***/ function (
+    /***/ 4070: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function () {
-          return __webpack_require__(1450);
+          return __webpack_require__(2877);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 8736: /***/ function (module, exports, __webpack_require__) {
+    /***/ 6065: /***/ function (module, exports, __webpack_require__) {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -37,15 +37,15 @@
       );
       const _reactdom = __webpack_require__(422);
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(3453)
+        __webpack_require__(4372)
       );
-      const _getimgprops = __webpack_require__(3317);
-      const _imageconfig = __webpack_require__(9774);
-      const _imageconfigcontext = __webpack_require__(7302);
-      const _warnonce = __webpack_require__(250);
-      const _routercontext = __webpack_require__(1495);
+      const _getimgprops = __webpack_require__(8042);
+      const _imageconfig = __webpack_require__(4126);
+      const _imageconfigcontext = __webpack_require__(7697);
+      const _warnonce = __webpack_require__(2235);
+      const _routercontext = __webpack_require__(1210);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(930)
+        __webpack_require__(6051)
       );
       // This is replaced by webpack define plugin
       const configEnv = {
@@ -370,7 +370,7 @@
       /***/
     },
 
-    /***/ 3317: /***/ function (
+    /***/ 8042: /***/ function (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -386,9 +386,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(250);
-      const _imageblursvg = __webpack_require__(1216);
-      const _imageconfig = __webpack_require__(9774);
+      const _warnonce = __webpack_require__(2235);
+      const _imageblursvg = __webpack_require__(5480);
+      const _imageconfig = __webpack_require__(4126);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -757,7 +757,7 @@
       /***/
     },
 
-    /***/ 1216: /***/ function (__unused_webpack_module, exports) {
+    /***/ 5480: /***/ function (__unused_webpack_module, exports) {
       "use strict";
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -812,7 +812,7 @@
       /***/
     },
 
-    /***/ 6048: /***/ function (
+    /***/ 6800: /***/ function (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -839,11 +839,11 @@
         },
       });
       const _interop_require_default = __webpack_require__(8266);
-      const _getimgprops = __webpack_require__(3317);
-      const _warnonce = __webpack_require__(250);
-      const _imagecomponent = __webpack_require__(8736);
+      const _getimgprops = __webpack_require__(8042);
+      const _warnonce = __webpack_require__(2235);
+      const _imagecomponent = __webpack_require__(6065);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(930)
+        __webpack_require__(6051)
       );
       const unstable_getImgProps = (imgProps) => {
         (0, _warnonce.warnOnce)(
@@ -875,7 +875,7 @@
       /***/
     },
 
-    /***/ 930: /***/ function (__unused_webpack_module, exports) {
+    /***/ 6051: /***/ function (__unused_webpack_module, exports) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -910,7 +910,7 @@
       /***/
     },
 
-    /***/ 1450: /***/ function (
+    /***/ 2877: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -931,8 +931,8 @@
 
       // EXTERNAL MODULE: ./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js
       var jsx_runtime = __webpack_require__(1527);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+main-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/image.js
-      var next_image = __webpack_require__(1577);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/file+..+diff-repo+packages+next+next-packed.tgz_react-dom@18.2.0_react@18.2.0/node_modules/next/image.js
+      var next_image = __webpack_require__(73);
       var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
       /* harmony default export */ var nextjs = {
         src: "/_next/static/media/nextjs.cae0b805.png",
@@ -962,12 +962,12 @@
       /***/
     },
 
-    /***/ 1577: /***/ function (
+    /***/ 73: /***/ function (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(6048);
+      module.exports = __webpack_require__(6800);
 
       /***/
     },
@@ -978,7 +978,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function () {
-      return __webpack_exec__(1552);
+      return __webpack_exec__(4070);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for index-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [405],
   {
-    /***/ 7410: /***/ function (
+    /***/ 4524: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/",
         function () {
-          return __webpack_require__(8078);
+          return __webpack_require__(1417);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 8078: /***/ function (
+    /***/ 1417: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -44,7 +44,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [888, 774, 179], function () {
-      return __webpack_exec__(7410);
+      return __webpack_exec__(4524);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for link-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [644],
   {
-    /***/ 1794: /***/ function (
+    /***/ 8959: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/link",
         function () {
-          return __webpack_require__(6090);
+          return __webpack_require__(8536);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 1283: /***/ function (module, exports) {
+    /***/ 2155: /***/ function (module, exports) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -86,7 +86,7 @@
       /***/
     },
 
-    /***/ 6802: /***/ function (module, exports, __webpack_require__) {
+    /***/ 8950: /***/ function (module, exports, __webpack_require__) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -98,7 +98,7 @@
           return getDomainLocale;
         },
       });
-      const _normalizetrailingslash = __webpack_require__(7292);
+      const _normalizetrailingslash = __webpack_require__(9936);
       const basePath =
         /* unused pure expression or super */ null && (false || "");
       function getDomainLocale(path, locale, locales, domainLocales) {
@@ -122,7 +122,7 @@
       /***/
     },
 
-    /***/ 6553: /***/ function (module, exports, __webpack_require__) {
+    /***/ 7862: /***/ function (module, exports, __webpack_require__) {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -138,17 +138,17 @@
       const _react = /*#__PURE__*/ _interop_require_default._(
         __webpack_require__(959)
       );
-      const _resolvehref = __webpack_require__(7463);
-      const _islocalurl = __webpack_require__(3936);
-      const _formaturl = __webpack_require__(7751);
-      const _utils = __webpack_require__(4756);
-      const _addlocale = __webpack_require__(6985);
-      const _routercontext = __webpack_require__(1495);
-      const _approutercontext = __webpack_require__(7593);
-      const _useintersection = __webpack_require__(6772);
-      const _getdomainlocale = __webpack_require__(6802);
-      const _addbasepath = __webpack_require__(5491);
-      const _routerreducertypes = __webpack_require__(1283);
+      const _resolvehref = __webpack_require__(7881);
+      const _islocalurl = __webpack_require__(8958);
+      const _formaturl = __webpack_require__(8777);
+      const _utils = __webpack_require__(7087);
+      const _addlocale = __webpack_require__(8850);
+      const _routercontext = __webpack_require__(1210);
+      const _approutercontext = __webpack_require__(4987);
+      const _useintersection = __webpack_require__(3564);
+      const _getdomainlocale = __webpack_require__(8950);
+      const _addbasepath = __webpack_require__(5780);
+      const _routerreducertypes = __webpack_require__(2155);
       const prefetched = new Set();
       function prefetch(router, href, as, options, appOptions, isAppRouter) {
         if (false) {
@@ -567,7 +567,7 @@
       /***/
     },
 
-    /***/ 6772: /***/ function (module, exports, __webpack_require__) {
+    /***/ 3564: /***/ function (module, exports, __webpack_require__) {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -580,7 +580,7 @@
         },
       });
       const _react = __webpack_require__(959);
-      const _requestidlecallback = __webpack_require__(5087);
+      const _requestidlecallback = __webpack_require__(3999);
       const hasIntersectionObserver =
         typeof IntersectionObserver === "function";
       const observers = new Map();
@@ -693,7 +693,7 @@
       /***/
     },
 
-    /***/ 6090: /***/ function (
+    /***/ 8536: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -709,7 +709,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(1527);
       /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(3639);
+        __webpack_require__(2075);
       /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_link__WEBPACK_IMPORTED_MODULE_1__
@@ -740,12 +740,12 @@
       /***/
     },
 
-    /***/ 3639: /***/ function (
+    /***/ 2075: /***/ function (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(6553);
+      module.exports = __webpack_require__(7862);
 
       /***/
     },
@@ -756,7 +756,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function () {
-      return __webpack_exec__(1794);
+      return __webpack_exec__(8959);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for routerDirect-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [58],
   {
-    /***/ 5319: /***/ function (
+    /***/ 190: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/routerDirect",
         function () {
-          return __webpack_require__(6539);
+          return __webpack_require__(8573);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 6539: /***/ function (
+    /***/ 8573: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -34,7 +34,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(1527);
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(975);
+        __webpack_require__(7659);
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_router__WEBPACK_IMPORTED_MODULE_1__
@@ -54,12 +54,12 @@
       /***/
     },
 
-    /***/ 975: /***/ function (
+    /***/ 7659: /***/ function (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(6079);
+      module.exports = __webpack_require__(7576);
 
       /***/
     },
@@ -70,7 +70,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function () {
-      return __webpack_exec__(5319);
+      return __webpack_exec__(190);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for script-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [797],
   {
-    /***/ 8857: /***/ function (
+    /***/ 769: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/script",
         function () {
-          return __webpack_require__(9418);
+          return __webpack_require__(9293);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 9418: /***/ function (
+    /***/ 9293: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -34,7 +34,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(1527);
       /* harmony import */ var next_script__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(5169);
+        __webpack_require__(3633);
       /* harmony import */ var next_script__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_script__WEBPACK_IMPORTED_MODULE_1__
@@ -67,12 +67,12 @@
       /***/
     },
 
-    /***/ 5169: /***/ function (
+    /***/ 3633: /***/ function (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(2599);
+      module.exports = __webpack_require__(8775);
 
       /***/
     },
@@ -83,7 +83,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function () {
-      return __webpack_exec__(8857);
+      return __webpack_exec__(769);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for withRouter-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [807],
   {
-    /***/ 626: /***/ function (
+    /***/ 2577: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/withRouter",
         function () {
-          return __webpack_require__(8937);
+          return __webpack_require__(2987);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 8937: /***/ function (
+    /***/ 2987: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -34,7 +34,7 @@
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
         __webpack_require__(1527);
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1__ =
-        __webpack_require__(975);
+        __webpack_require__(7659);
       /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_1___default =
         /*#__PURE__*/ __webpack_require__.n(
           next_router__WEBPACK_IMPORTED_MODULE_1__
@@ -53,12 +53,12 @@
       /***/
     },
 
-    /***/ 975: /***/ function (
+    /***/ 7659: /***/ function (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
-      module.exports = __webpack_require__(6079);
+      module.exports = __webpack_require__(7576);
 
       /***/
     },
@@ -69,7 +69,7 @@
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
     /******/ __webpack_require__.O(0, [774, 888, 179], function () {
-      return __webpack_exec__(626);
+      return __webpack_exec__(2577);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for 3f784ff6-HASH.js
@@ -1,8 +1,8 @@
 "use strict";
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
-  [904],
+  [658],
   {
-    /***/ 4489: /***/ function (
+    /***/ 9234: /***/ function (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -19,8 +19,8 @@
       /*
  Modernizr 3.0.0pre (Custom Build) | MIT
 */
-      var aa = __webpack_require__(8288),
-        ba = __webpack_require__(6266),
+      var aa = __webpack_require__(4978),
+        ba = __webpack_require__(4794),
         ca = {
           usingClientEntryPoint: !1,
           Events: null,
Diff for 418-HASH.js

Diff too large to display

Diff for 951.HASH.js
@@ -1,8 +1,8 @@
 "use strict";
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
-  [951],
+  [993],
   {
-    /***/ 4951: /***/ function (
+    /***/ 3993: /***/ function (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
Diff for page-24646ff7719f1f53.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [760, 185, 952],
   {
-    /***/ 7488: /***/ function () {
+    /***/ 3775: /***/ function () {
       /***/
     },
   },
@@ -10,8 +10,8 @@
     /******/ var __webpack_exec__ = function (moduleId) {
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
-    /******/ __webpack_require__.O(0, [904, 418, 744], function () {
-      return __webpack_exec__(7488);
+    /******/ __webpack_require__.O(0, [658, 26, 744], function () {
+      return __webpack_exec__(3775);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for page-61326182619b893c.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [952, 185, 760],
   {
-    /***/ 7488: /***/ function () {
+    /***/ 3775: /***/ function () {
       /***/
     },
   },
@@ -10,8 +10,8 @@
     /******/ var __webpack_exec__ = function (moduleId) {
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
-    /******/ __webpack_require__.O(0, [904, 418, 744], function () {
-      return __webpack_exec__(7488);
+    /******/ __webpack_require__.O(0, [658, 26, 744], function () {
+      return __webpack_exec__(3775);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for layout-45963..9007a8972.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [185, 952, 760],
   {
-    /***/ 7488: /***/ function () {
+    /***/ 3775: /***/ function () {
       /***/
     },
   },
@@ -10,8 +10,8 @@
     /******/ var __webpack_exec__ = function (moduleId) {
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
-    /******/ __webpack_require__.O(0, [904, 418, 744], function () {
-      return __webpack_exec__(7488);
+    /******/ __webpack_require__.O(0, [658, 26, 744], function () {
+      return __webpack_exec__(3775);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for main-HASH.js

Diff too large to display

Diff for main-app-HASH.js
@@ -1,31 +1,31 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [744],
   {
-    /***/ 1428: /***/ function (
+    /***/ 9802: /***/ function (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
     ) {
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.t.bind(__webpack_require__, 216, 23)
+        __webpack_require__.t.bind(__webpack_require__, 5823, 23)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.t.bind(__webpack_require__, 9484, 23)
+        __webpack_require__.t.bind(__webpack_require__, 3533, 23)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.t.bind(__webpack_require__, 480, 23)
+        __webpack_require__.t.bind(__webpack_require__, 7442, 23)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.t.bind(__webpack_require__, 751, 23)
+        __webpack_require__.t.bind(__webpack_require__, 2532, 23)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.t.bind(__webpack_require__, 6890, 23)
+        __webpack_require__.t.bind(__webpack_require__, 688, 23)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.t.bind(__webpack_require__, 8033, 23)
+        __webpack_require__.t.bind(__webpack_require__, 9848, 23)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.t.bind(__webpack_require__, 6203, 23)
+        __webpack_require__.t.bind(__webpack_require__, 1536, 23)
       );
 
       /***/
@@ -36,8 +36,8 @@
     /******/ var __webpack_exec__ = function (moduleId) {
       return __webpack_require__((__webpack_require__.s = moduleId));
     };
-    /******/ __webpack_require__.O(0, [904, 418], function () {
-      return __webpack_exec__(218), __webpack_exec__(1428);
+    /******/ __webpack_require__.O(0, [658, 26], function () {
+      return __webpack_exec__(670), __webpack_exec__(9802);
     });
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for webpack-HASH.js
@@ -219,7 +219,7 @@
     /******/ __webpack_require__.u = function (chunkId) {
       /******/ // return url for filenames based on template
       /******/ return (
-        "static/chunks/" + chunkId + "." + "c0220e3a07c41dc5" + ".js"
+        "static/chunks/" + chunkId + "." + "ee8f782902686538" + ".js"
       );
       /******/
     };
Diff for index.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-50d000e85c50e09b.js"
+      src="/_next/static/chunks/webpack-4d2814744c68556e.js"
       defer=""
     ></script>
     <script
@@ -19,15 +19,15 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-1b9c93b038fa314d.js"
+      src="/_next/static/chunks/main-d30785853d3ce8c3.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-7b0080dfb0361625.js"
+      src="/_next/static/chunks/pages/_app-e006aa4d459cf5bd.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/index-0c70b5cac8e37aad.js"
+      src="/_next/static/chunks/pages/index-e4fa21067c6620fd.js"
       defer=""
     ></script>
     <script src="/_next/static/BUILD_ID/_buildManifest.js" defer=""></script>
Diff for link.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-50d000e85c50e09b.js"
+      src="/_next/static/chunks/webpack-4d2814744c68556e.js"
       defer=""
     ></script>
     <script
@@ -19,15 +19,15 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-1b9c93b038fa314d.js"
+      src="/_next/static/chunks/main-d30785853d3ce8c3.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-7b0080dfb0361625.js"
+      src="/_next/static/chunks/pages/_app-e006aa4d459cf5bd.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-91a07e69e1ca75d3.js"
+      src="/_next/static/chunks/pages/link-1320719f1f584741.js"
       defer=""
     ></script>
     <script src="/_next/static/BUILD_ID/_buildManifest.js" defer=""></script>
Diff for withRouter.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-50d000e85c50e09b.js"
+      src="/_next/static/chunks/webpack-4d2814744c68556e.js"
       defer=""
     ></script>
     <script
@@ -19,15 +19,15 @@
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/main-1b9c93b038fa314d.js"
+      src="/_next/static/chunks/main-d30785853d3ce8c3.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-7b0080dfb0361625.js"
+      src="/_next/static/chunks/pages/_app-e006aa4d459cf5bd.js"
       defer=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/withRouter-8ddeba917c22a948.js"
+      src="/_next/static/chunks/pages/withRouter-8238a98becd29f4d.js"
       defer=""
     ></script>
     <script src="/_next/static/BUILD_ID/_buildManifest.js" defer=""></script>
Commit: 0d73245

Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Pages Router, we allowed a status code.

Should we do the same for App Router?

https://nextjs.org/docs/pages/building-your-application/routing/api-routes#redirects-to-a-specified-path-or-url

res.redirect(307, '/somewhere')

@smaeda-ks
Copy link
Member Author

smaeda-ks commented Aug 28, 2023

Thanks for asking @styfle
I'd say it's probably fine with 307/308, given this is for App Routers, and such legacy clients who can't support 307/308 rarely exist these days.

Also, after discussing with @timneutkens, I was told that we need to add a separate API, so I'm now adding new permanentRedirect() function instead of adding new parameters to the existing redirect function.

@smaeda-ks smaeda-ks changed the title Add permanent redirect parameter to change status code Add new permanentRedirect function in App Router Aug 28, 2023
Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asked @sebmarkbage to have a look at this too as it's been a while since we discussed adding permanentRedirect. PR looks good overall, had 2 small comments. Great work @smaeda-ks!

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Shohei 💯

@ijjk
Copy link
Member

ijjk commented Aug 28, 2023

Tests Passed

@ztanner ztanner merged commit efd8d22 into vercel:canary Aug 28, 2023
94 checks passed
if (redirectUrl) {
errorMetaTags.push(
<meta
httpEquiv="refresh"
content={`0;url=${redirectUrl}`}
content={`${isPermanent ? 0 : 1};url=${redirectUrl}`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand setting this number to 1 means the browser will wait 1 second before redirecting, are you aware of that?

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional. Googlebot considers 0 to be permanent and anything above 0 to be temporary: https://developers.google.com/search/docs/crawling-indexing/301-redirects

It's an SEO thing basically, unfortunately Googlebot doesn't support http-equiv status which would allow us to do this while preserving instant redirect.

Copy link
Contributor

@karlhorky karlhorky Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1s delay downsides with redirect() (maybe this should be its own issue/discussion)

Hm, the 1s delay on redirect() is not ideal for auth gating (temporary redirect() in either in page.tsx or in layout.tsx):

  • unusual, slow UX (waiting for 1 second)
  • switching to permanentRedirect() would not be correct semantically (a permanent redirect from a page to /login not correct)
  • often Middleware is suggested here, but Middleware cannot be used with database auth due to Middleware lacking support for database TCP connections

Ideally, one of the following seems like more well-rounded solutions without the UX downsides:

A) Middleware TCP support
B) Setting a Location response header when redirect() or permanentRedirect() are used - in a style similar to how React Float changes other parts of tree / response

But I guess for now we will consider recommending permanentRedirect() to our students for now to avoid the 1s weirdness (tradeoff against the semantically-incorrect "permanent" part)

If a <meta> tag is the only thing that can be used for now, I guess the previous solution of 307 + 0s refresh feels at first glance like a better tradeoff... (at least the status code is correct in that case and it doesn't promote a slow UX)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simple solution would be to redirect from JavaScript if there is the refresh meta tag so you don’t need to wait the 1 second delay, not sure if the router already does this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tricky part is around streaming in general. If it's used in a streaming context and HTTP headers are already sent to the client (e.g., with status 200), we can't emit additional headers afterward. This is why meta tag is used this way as far as I understand.

Google warns Javascript redirect to be the last resort to adopt so I guess it's safe to avoid that:
https://developers.google.com/search/docs/crawling-indexing/301-redirects#jslocation

Copy link
Contributor

@karlhorky karlhorky Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's used in a streaming context and HTTP headers are already sent to the client (e.g., with status 200), we can't emit additional headers afterward

Right, with my suggestion B above I meant to "lift up" the redirect() / permanentRedirect() and logic to an earlier part in the response cycle, so that both the status code and the Location header could be set

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The moment your components run you can't assume the headers haven't been sent yet. In the near future there will be early hints / preloads that means even before your code runs it's already streaming.

Redirecting for authentication should be handled in middleware if you want it to run in front of any rendering.

Copy link
Contributor

@karlhorky karlhorky Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use pages / layouts auth gating as also recommended as an alternative by Lee - not as a choice, but as a necessity.

We do this because Middleware is not an option. The Edge Runtime Middleware is not capable of doing auth gating with database auth, if you need a TCP connection, which most database options do (workaround edge database products exist, such as Vercel Postgres / Neon, but not everyone can use them). So these users of Next.js App Router are currently stuck with pages / layout auth gating.

However, I would love to be able to do this with Middleware, eg. if there will be tangible movement soon about Node.js Runtime Middleware as mentioned by Lee:

exploring ways to bridge the gap towards allowing folks to experimentally/"dangerously" opt-into using the Node.js Runtime

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI approved Approve running CI for fork locked type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants