Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lws-request-monitor

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lws-request-monitor - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

12

index.js

@@ -18,3 +18,7 @@ module.exports = MiddlewareBase => class RequestMonitor extends MiddlewareBase {

if (ctx.request.rawBody) {
reqInfo.body = ctx.request.body
if (Object.keys(ctx.request.body).length) {
reqInfo.body = ctx.request.body
} else {
reqInfo.body = ctx.request.rawBody
}
} else {

@@ -39,2 +43,8 @@ const incomingBuffer = ctx.req._readableState.buffer

if (ctx.response.is('json')) {
try {
resInfo.body = JSON.parse(resInfo.body)
} catch (err) {}
}
const stream = require('stream')

@@ -41,0 +51,0 @@ if (resInfo.body instanceof stream.Readable) {

2

package.json
{
"name": "lws-request-monitor",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "0.1.4",
"version": "0.1.5",
"description": "Verbose request logging middleware for lws",

@@ -6,0 +6,0 @@ "repository": "https://github.com/lwsjs/request-monitor.git",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc