1 | const mung = require('express-mung');
|
2 | const { kill } = require('q3-core-session');
|
3 | const runRedaction = require('./redact');
|
4 |
|
5 | exports.request = (req, res, next) => {
|
6 | runRedaction(req, req, 'request');
|
7 | next();
|
8 | };
|
9 |
|
10 | exports.response = mung.json((body, req) => {
|
11 | runRedaction(req, body, 'response');
|
12 | kill();
|
13 |
|
14 | return body;
|
15 | });
|