ti2 1.0.93 → 1.0.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -191,7 +191,7 @@ module.exports = async ({
|
|
|
191
191
|
app.use(async (req, res, next) => {
|
|
192
192
|
const startHrTime = process.hrtime();
|
|
193
193
|
const body = composeBodyFromReq(req);
|
|
194
|
-
req.
|
|
194
|
+
req.requestBody = R.clone(body);
|
|
195
195
|
ti2Events.emit('request.start', body);
|
|
196
196
|
req.requestId = body.requestId;
|
|
197
197
|
res.on('finish', async () => {
|
|
@@ -201,7 +201,7 @@ module.exports = async ({
|
|
|
201
201
|
10,
|
|
202
202
|
);
|
|
203
203
|
ti2Events.emit('request.end', {
|
|
204
|
-
...
|
|
204
|
+
...req.requestBody,
|
|
205
205
|
cacheKey: req.cacheKey,
|
|
206
206
|
responseTimeInMs,
|
|
207
207
|
responseStatusCode: res.statusCode,
|
|
@@ -328,7 +328,7 @@ module.exports = async ({
|
|
|
328
328
|
...cacheSettings['*'],
|
|
329
329
|
...(currentPlugin ? R.keys(filteredPluginCacheSettings) : []),
|
|
330
330
|
];
|
|
331
|
-
const body = req.
|
|
331
|
+
const body = req.requestBody;
|
|
332
332
|
if (cachingOperations.indexOf(body.operationId) > -1) {
|
|
333
333
|
const cacheBody = R.omit(['requestId', 'date'], body);
|
|
334
334
|
const cacheKey = hash(cacheBody);
|