streetmix/streetmix

View on GitHub
app/lib/request_handlers/request_log.js

Summary

Maintainability
A
0 mins
Test Coverage
import logger from '../logger.js'

export default function (req, res, next) {
  const contentType = req.headers['content-type'] || ''

  logger.debug({
    method: req.method,
    url: req.url,
    content_type: contentType,
    user_id: req.cookies.user_id
  })

  next()
}