File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,13 +16,11 @@ export default timeout.handler({
1616 disable : [ ] ,
1717
1818 onTimeout : function ( req , res , next ) {
19- const incrementTags = [ ]
20- // Be careful with depending on attributes set on the `req` because
21- // under certain conditions the contextualizers might not yet have
22- // had a chance to run.
23- if ( req . pagePath ) {
24- incrementTags . push ( `path:${ req . pagePath } ` )
25- }
19+ // The `req.pagePath` can come later so it's not guaranteed to always
20+ // be present. It's added by the `handle-next-data-path.js` middleware
21+ // we translates those "cryptic" `/_next/data/...` URLs from
22+ // client-side routing.
23+ const incrementTags = [ `path:${ req . pagePath || req . path } ` ]
2624 if ( req . context ?. currentCategory ) {
2725 incrementTags . push ( `product:${ req . context . currentCategory } ` )
2826 }
You can’t perform that action at this time.
0 commit comments