Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/routing/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ export async function setup(app) {
.end();
}

if (err instanceof NotFound) {
/* Delegate to Next.js only for GET and HEAD requests. This aligns with
* handling in src/routing/staticSite.js.
*/
if (err instanceof NotFound && ["GET", "HEAD"].includes(req.method)) {
/* A note about routing: if the current URL path (i.e. req.path) matches a
* a page known to the NextJS routes ("pages") then that page will be
* shown (with response code 200). Moving to server-side rendering of
Expand Down