Blame view
lib/listener-partner/middlewares/common.js
540 Bytes
ab5828535
|
1 2 3 4 5 6 7 8 9 10 11 12 |
'use strict'; const uniqid = require('uniqid'); const logger = require('komodo-sdk/logger'); module.exports = function common(req, res, next) { if (req.url.search('/favicon.ico') === 0) { res.sendStatus(404); return; } res.locals.xid = uniqid(); |
c98ae8750
|
13 |
res.locals.x_http_request_ts = new Date(); |
ab5828535
|
14 15 16 17 18 19 20 21 22 23 |
logger.info('Got request from partner', { xid: res.locals.xid, ip: req.ip, method: req.method, path: req.path, url: req.url, qs: req.query, }); next(); }; |