Skip to content

Commit 829448b

Browse files
committed
Configure morgan to ignore browser requests to /favico.ico
1 parent 190b24b commit 829448b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

frontend/server.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ if (DEVELOPMENT) {
3737
"/assets",
3838
express.static("build/client/assets", { immutable: true, maxAge: "1y" }),
3939
);
40-
app.use(morgan("tiny", { skip: (_req, res) => res.statusCode < 400 }));
40+
app.use(morgan("tiny", {
41+
skip: (req, res) => {
42+
return res.statusCode < 400
43+
|| req.url === "/favicon.ico"
44+
}
45+
}));
4146
app.use(express.static("build/client", { maxAge: "1h" }));
4247
app.use(await import(BUILD_PATH).then((mod) => mod.app));
4348
}

0 commit comments

Comments
 (0)