Skip to content

Commit

Permalink
feat: update global throttle limit
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed May 9, 2024
1 parent 454e00d commit 84b4b03
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodepress",
"version": "4.6.0",
"version": "4.6.1",
"description": "RESTful API service for Surmon.me blog",
"author": "Surmon",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { VoteModule } from '@app/modules/vote/vote.module'
ThrottlerModule.forRoot([
{
ttl: minutes(5), // 5 minutes = 300s
limit: 300, // 300 limit
limit: 800, // 800 limit
ignoreUserAgents: [/googlebot/gi, /bingbot/gi, /baidubot/gi]
}
]),
Expand Down
2 changes: 1 addition & 1 deletion src/modules/feedback/feedback.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class FeedbackController {
}

@Post()
@Throttle({ default: { ttl: seconds(30), limit: 3 } })
@Throttle({ default: { ttl: seconds(30), limit: 5 } })
@Responser.handle('Create feedback')
async createFeedback(
@Body() feedback: FeedbackBase,
Expand Down

0 comments on commit 84b4b03

Please sign in to comment.