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

serverless-api-gateway-throttling

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-api-gateway-throttling - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3-rc1

2

package.json
{
"name": "serverless-api-gateway-throttling",
"version": "2.0.2",
"version": "2.0.3-rc1",
"description": "A plugin for the Serverless framework which configures throttling for API Gateway endpoints.",

@@ -5,0 +5,0 @@ "main": "src/apiGatewayThrottlingPlugin.js",

@@ -0,0 +0,0 @@ # serverless-api-gateway-throttling

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ String.prototype.replaceAll = function (search, replacement) {

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -51,19 +51,19 @@ const isEmpty = require('lodash.isempty');

let routeSettings = {};
if (method.toUpperCase() == 'ANY') {
let httpMethodsToConfigureThrottlingFor = ['GET', 'DELETE', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT'];
for (let methodWithThrottlingSettings of httpMethodsToConfigureThrottlingFor) {
routeSettings = {
...routeSettings,
...routeSettingsForMethod(path, methodWithThrottlingSettings, endpointSettings)
}
};
}
else {
routeSettings = {
...routeSettings,
...routeSettingsForMethod(path, method, endpointSettings),
}
}
return routeSettings;
// let routeSettings = {};
// if (method.toUpperCase() == 'ANY') {
// let httpMethodsToConfigureThrottlingFor = ['GET', 'DELETE', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT'];
// for (let methodWithThrottlingSettings of httpMethodsToConfigureThrottlingFor) {
// routeSettings = {
// ...routeSettings,
// ...routeSettingsForMethod(path, methodWithThrottlingSettings, endpointSettings)
// }
// };
// }
// else {
// routeSettings = {
// ...routeSettings,
// ...routeSettingsForMethod(path, method, endpointSettings),
// }
// }
return routeSettingsForMethod(path, method, endpointSettings);
}

@@ -70,0 +70,0 @@

@@ -0,0 +0,0 @@ const isEmpty = require('lodash.isempty');

Sorry, the diff of this file is not supported yet

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