mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 18:06:42 +02:00
fix: upgrade calendar jest to v30 and add rate limiting to contacts/todo backends
- Calendar backend: upgrade jest 29→30 to fix broken pnpm symlink (jest 29 wasn't resolving in pnpm store, all 63 tests now pass) - Contacts backend: add @nestjs/throttler (100 req/min) - Todo backend: add @nestjs/throttler (100 req/min) - Consistent rate limiting across all three backends (calendar already had it) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
37a699131c
commit
7f4edb3dfb
6 changed files with 165 additions and 13 deletions
|
|
@ -30,6 +30,7 @@
|
|||
"@nestjs/config": "^3.3.0",
|
||||
"@nestjs/core": "^10.4.15",
|
||||
"@nestjs/platform-express": "^10.4.15",
|
||||
"@nestjs/throttler": "^6.2.1",
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.1",
|
||||
"csv-parse": "^6.1.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { ThrottlerModule } from '@nestjs/throttler';
|
||||
import { MetricsModule } from '@manacore/shared-nestjs-metrics';
|
||||
import { DatabaseModule } from './db/database.module';
|
||||
import { ContactModule } from './contact/contact.module';
|
||||
|
|
@ -22,6 +23,12 @@ import { AdminModule } from './admin/admin.module';
|
|||
isGlobal: true,
|
||||
envFilePath: '.env',
|
||||
}),
|
||||
ThrottlerModule.forRoot([
|
||||
{
|
||||
ttl: 60000, // 60 seconds
|
||||
limit: 100, // 100 requests per minute
|
||||
},
|
||||
]),
|
||||
MetricsModule.register({
|
||||
prefix: 'contacts_',
|
||||
excludePaths: ['/health'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue