Skip to content

Commit

Permalink
added logger for request TODO TEST
Browse files Browse the repository at this point in the history
will be reverted
  • Loading branch information
jagankumar-egov committed May 28, 2024
1 parent 2e08528 commit d5c2bf5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const requestSchema = object({
const requestMiddleware = (req: Request, res: Response, next: NextFunction) => {
try {
logger.info(`RECEIVED A HTTP REQUEST :: URI :: ${req.url}`);
logger.info(`RECEIVED A HTTP REQUEST :: ${JSON.stringify(req)}`);

// Check if the content type is 'application/json'
const contentType = req.headers['content-type'];
if (!contentType || !contentType.split(';').map(part => part.trim()).includes('application/json')) {
Expand Down

0 comments on commit d5c2bf5

Please sign in to comment.