diff --git a/src/lib/middleware/origin-middleware.test.ts b/src/lib/middleware/origin-middleware.test.ts index dd51b8fb95..e0f940ee53 100644 --- a/src/lib/middleware/origin-middleware.test.ts +++ b/src/lib/middleware/origin-middleware.test.ts @@ -45,7 +45,7 @@ describe('originMiddleware', () => { middleware(req, res, next); - expect(loggerMock.debug).toHaveBeenCalledWith('UI request', { + expect(loggerMock.info).toHaveBeenCalledWith('UI request', { method: req.method, }); }); @@ -58,7 +58,7 @@ describe('originMiddleware', () => { middleware(req, res, next); - expect(loggerMock.debug).toHaveBeenCalledWith('API request', { + expect(loggerMock.info).toHaveBeenCalledWith('API request', { method: req.method, userAgent: TEST_USER_AGENT, }); diff --git a/src/lib/middleware/origin-middleware.ts b/src/lib/middleware/origin-middleware.ts index dee875a97d..85bb8bb1c0 100644 --- a/src/lib/middleware/origin-middleware.ts +++ b/src/lib/middleware/origin-middleware.ts @@ -16,9 +16,9 @@ export const originMiddleware = ({ const isUI = !req.headers.authorization; if (isUI) { - logger.debug('UI request', { method: req.method }); + logger.info('UI request', { method: req.method }); } else { - logger.debug('API request', { + logger.info('API request', { method: req.method, userAgent: req.headers['user-agent'], });