File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -329,8 +329,11 @@ const server = http.createServer((req, res) => {
329329 }
330330
331331 if ( ! config . silent ) {
332- const clientIp = req . headers [ 'x-forwarded-for' ] || req . connection . remoteAddress ;
333- console . log ( `[${ new Date ( ) . toISOString ( ) } ] ${ req . method } ${ req . url } ${ config . logIp ? ` (${ clientIp } )` : '' } ` ) ;
332+ // Skip logging PWA asset requests to reduce noise. chrome somehoe sends this every second to dev server.
333+ if ( ! parsedUrl . pathname . includes ( '/assets/pwa/' ) ) {
334+ const clientIp = req . headers [ 'x-forwarded-for' ] || req . connection . remoteAddress ;
335+ console . log ( `[${ new Date ( ) . toISOString ( ) } ] ${ req . method } ${ req . url } ${ config . logIp ? ` (${ clientIp } )` : '' } ` ) ;
336+ }
334337 }
335338
336339 // Handle directory requests without trailing slash
You can’t perform that action at this time.
0 commit comments