Fix jwt-token
This commit is contained in:
@@ -84,10 +84,11 @@ class ApiDebugLogger {
|
||||
if (!this.enabled) return;
|
||||
|
||||
const timestamp = new Date().toISOString();
|
||||
const logEntry = `[${timestamp}] INCOMING ${req.method} ${req.url} - BODY:${JSON.stringify(this.sanitizeData(req.body))} - HEADERS:${JSON.stringify(this.sanitizeHeaders(req.headers))}`;
|
||||
const fullUrl = req.originalUrl || req.url;
|
||||
const logEntry = `[${timestamp}] INCOMING ${req.method} ${fullUrl} - BODY:${JSON.stringify(this.sanitizeData(req.body))} - HEADERS:${JSON.stringify(this.sanitizeHeaders(req.headers))}`;
|
||||
|
||||
// Always log to console
|
||||
console.log(`🐛 API Request: ${req.method} ${req.url}`);
|
||||
console.log(`🐛 API Request: ${req.method} ${fullUrl}`);
|
||||
|
||||
// Try to log to file if enabled
|
||||
if (this.fileLoggingEnabled) {
|
||||
@@ -103,9 +104,10 @@ class ApiDebugLogger {
|
||||
logResponse(req, res, responseBody) {
|
||||
if (!this.enabled) return;
|
||||
|
||||
const fullUrl = req.originalUrl || req.url;
|
||||
this.log(
|
||||
req.method,
|
||||
req.url,
|
||||
fullUrl,
|
||||
res.statusCode,
|
||||
req.body,
|
||||
responseBody,
|
||||
|
||||
Reference in New Issue
Block a user