diff --git a/src/interceptors/logging.interceptor.ts b/src/interceptors/logging.interceptor.ts index e74f4c2..9e06186 100644 --- a/src/interceptors/logging.interceptor.ts +++ b/src/interceptors/logging.interceptor.ts @@ -15,7 +15,7 @@ export class LoggingInterceptor implements NestInterceptor { return next.handle().pipe( map((response) => { - // Filter out sensitive fields from the request body + // Filter out sensitive fields from the request body for logging const filteredRequestBody = this.filterSensitiveFields(body); console.log( '-------------------------------------------------------------------', @@ -28,10 +28,10 @@ export class LoggingInterceptor implements NestInterceptor { ) { console.log(`Request Body: ${JSON.stringify(filteredRequestBody)}`); } - // Filter out sensitive fields from the response + // Filter out sensitive fields from the response for logging const filteredResponse = this.filterSensitiveFields(response); console.log(`Response: ${JSON.stringify(filteredResponse)}`); - return filteredResponse; + return response; // Return the actual response unmodified }), catchError((error) => { // Do not log anything if there is an error