Add request/response logging middleware to enhance auditing and debugging
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m25s
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m25s
This commit is contained in:
@@ -3,6 +3,7 @@ import express from 'express';
|
||||
import cors from 'cors';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import requestResponseLogger from './middleware/logging.js';
|
||||
import { initDatabase } from './config/database.js';
|
||||
import { initMailer } from './config/mailer.js';
|
||||
import authRoutes from './routes/auth.js';
|
||||
@@ -31,6 +32,8 @@ const corsOptions = process.env.APP_URL
|
||||
: {};
|
||||
app.use(cors(corsOptions));
|
||||
app.use(express.json());
|
||||
// Request/Response logging (filters sensitive fields)
|
||||
app.use(requestResponseLogger);
|
||||
|
||||
// Initialize database & start server
|
||||
async function start() {
|
||||
|
||||
Reference in New Issue
Block a user