New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@musicode/egg-rate-limiter

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@musicode/egg-rate-limiter - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

app/middleware/rate_limiter.js

@@ -95,3 +95,3 @@

if (onError) {
onError(ctx)
onError(ctx, app)
}

@@ -98,0 +98,0 @@ else {

{
"name": "@musicode/egg-rate-limiter",
"version": "0.0.3",
"version": "0.0.4",
"description": "",

@@ -5,0 +5,0 @@ "eggPlugin": {

@@ -31,5 +31,8 @@ # egg-rate-limiter

exports.rateLimiter = {
error: '超过调用上限时的错误信息,有默认值,可不配',
onError: function (ctx, app) {
// 超过上限时触发
// 也可不配此回调,默认会返回 429 状态码
},
routers: {
'a/b/c': {
'/a/b': {
// 举个例子,1 分钟最多调 10 次

@@ -36,0 +39,0 @@ max: 10,

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