nestjs-security-cli 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -70,10 +70,14 @@ import { SecurityModule, BlacklistedIp, BlacklistedIpSchema } from 'nestjs-secur
70
70
  { name: BlacklistedIp.name, schema: BlacklistedIpSchema }
71
71
  ] ),
72
72
  // Security module
73
- SecurityModule.forRoot( {
74
- enableDatabase: true,
75
- defaultBlockDurationHours: 24,
76
- enableAutoBlocking: true
73
+ SecurityModule.forRootAsync( {
74
+ enableAdminPanel: true,
75
+ useFactory: (configService: ConfigService) => ({
76
+ enableDatabase: true,
77
+ defaultBlockDurationHours: 24,
78
+ enableAutoBlocking: true
79
+ }),
80
+ inject: [ ConfigService ]
77
81
  } )
78
82
  ]
79
83
  } )
@@ -81,20 +85,6 @@ export class AppModule {
81
85
  }
82
86
  ```
83
87
 
84
- ## With forRootAsync
85
-
86
- ```typescript
87
- SecurityModule.forRootAsync( {
88
- enableAdminPanel: true,
89
- useFactory: (configService: ConfigService) => ({
90
- enableDatabase: true,
91
- defaultBlockDurationHours: 24,
92
- enableAutoBlocking: true
93
- }),
94
- inject: [ ConfigService ]
95
- } )
96
- ```
97
-
98
88
  ## Cache-Only Mode (No Database)
99
89
 
100
90
  If you don't want to use MongoDB, you can skip the schema registration:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-security-cli",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Advanced IP blocking, role-based security, and attack detection for NestJS applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",