fix (backend): fix order of logger initialization
This commit is contained in:
parent
a2316b7caf
commit
7441f0861a
1 changed files with 2 additions and 2 deletions
|
@ -42,9 +42,9 @@ const router = new Router();
|
||||||
|
|
||||||
//#region Routing
|
//#region Routing
|
||||||
|
|
||||||
const inboxLogger = serverLogger.createSubLogger("inbox");
|
|
||||||
|
|
||||||
function inbox(ctx: Router.RouterContext) {
|
function inbox(ctx: Router.RouterContext) {
|
||||||
|
const inboxLogger = serverLogger.createSubLogger("inbox");
|
||||||
|
|
||||||
if (ctx.req.headers.host !== config.host) {
|
if (ctx.req.headers.host !== config.host) {
|
||||||
inboxLogger.warn(`regecting invalid host (${ctx.req.headers.host})`);
|
inboxLogger.warn(`regecting invalid host (${ctx.req.headers.host})`);
|
||||||
ctx.status = 400;
|
ctx.status = 400;
|
||||||
|
|
Loading…
Reference in a new issue