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

lambda-serverless-api

Package Overview
Dependencies
Maintainers
1
Versions
396
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda-serverless-api - npm Package Compare versions

Comparing version 11.1.0 to 11.1.1

2

lib/logic/router.js

@@ -42,3 +42,3 @@ import get from 'lodash.get';

if (resp === null) {
throw ApiErrorFn('Method / Route not allowed', 403);
throw ApiErrorFn('Method / Route not allowed', 403, 99008);
}

@@ -45,0 +45,0 @@ return resp;

@@ -86,11 +86,16 @@ import assert from 'assert';

const signature = this.signature
.map((p) => {
if (p === '$ROUTE') {
const matchedRoute = router.recognize(event.httpMethod, get(event, 'path', ''));
return matchedRoute ? matchedRoute[0].handler.route.split(' ')[1] : get(message, 'event.path');
}
return get(message, p);
})
.filter((e) => !!e).join(' ');
let signature;
if (message?.response?.statusCode === 403 && message?.response?.body?.messageId === 99008) {
signature = `403: ${message?.response?.body?.message}`;
} else {
signature = this.signature
.map((p) => {
if (p === '$ROUTE') {
const matchedRoute = router.recognize(event.httpMethod, get(event, 'path', ''));
return matchedRoute ? matchedRoute[0].handler.route.split(' ')[1] : get(message, 'event.path');
}
return get(message, p);
})
.filter((e) => !!e).join(' ');
}
assert(signature !== '');

@@ -97,0 +102,0 @@

@@ -41,3 +41,3 @@ {

},
"version": "11.1.0",
"version": "11.1.1",
"scripts": {

@@ -44,0 +44,0 @@ "clean": "rm -rf lib",

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