editor/login: ignore /health request
This commit is contained in:
parent
608b3b1260
commit
ae70d5ea00
@ -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);
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user