editor/login: ignore /health request

This commit is contained in:
Alexey Bannov 2023-11-09 19:58:03 +03:00
parent 608b3b1260
commit ae70d5ea00
2 changed files with 22 additions and 2 deletions

View File

@ -76,7 +76,18 @@ app.use(
cacheControl: false, cacheControl: false,
}) })
); );
app.use(logger("dev", { stream: winston.stream }));
app.use(logger("dev", {
stream: winston.stream,
skip: function (req, res) {
if (req.url == '/health') {
return true;
} else {
return false;
}
}
}));
if (IS_DEVELOPMENT) { if (IS_DEVELOPMENT) {
app.use(devMiddleware); app.use(devMiddleware);

View File

@ -44,7 +44,16 @@ app.use(
}) })
); );
app.use(logger("dev", { stream: stream })); app.use(logger("dev", {
stream: stream,
skip: function (req, res) {
if (req.url == '/health') {
return true;
} else {
return false;
}
}
}));
app.get("*", async (req: ILoginRequest, res: Response, next) => { app.get("*", async (req: ILoginRequest, res: Response, next) => {
const { i18n, cookies, headers, query, t, url } = req; const { i18n, cookies, headers, query, t, url } = req;