Skip to content

Commit c21de0e

Browse files
committed
chore: logging
1 parent d36fff0 commit c21de0e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/runtime/src/templates/getHandler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type Mutable<T> = {
3232
}
3333

3434
// We return a function and then call `toString()` on it to serialise it as the launcher function
35-
// eslint-disable-next-line max-params
35+
// eslint-disable-next-line max-params, max-lines-per-function
3636
const makeHandler = (conf: NextConfig, app, pageRoot, staticManifest: Array<[string, string]> = [], mode = 'ssr') => {
3737
// Change working directory into the site root, unless using Nx, which moves the
3838
// dist directory and handles this itself
@@ -104,6 +104,9 @@ const makeHandler = (conf: NextConfig, app, pageRoot, staticManifest: Array<[str
104104
if (prefetchResponse) {
105105
return prefetchResponse
106106
}
107+
if (event.headers['x-next-debug-logging']) {
108+
console.log(event.path, event.headers)
109+
}
107110

108111
event.path = normalizePath(event)
109112

0 commit comments

Comments
 (0)