@astratra/saas-kit 1.5.0 → 1.5.1
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.
- package/README.md +19 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -129,6 +129,25 @@ createSaasApp({
|
|
|
129
129
|
Non défini par défaut (comportement Express standard, inchangé) — dépend du
|
|
130
130
|
déploiement, Astratra ne peut pas le deviner à ta place.
|
|
131
131
|
|
|
132
|
+
`apiRateLimit`/`loginRateLimit` sont transmis tels quels à
|
|
133
|
+
`createApiLimiter`/`createLoginLimiter` (`@astratra/security`) : pour isoler
|
|
134
|
+
leurs compteurs sur une même instance Redis, fournis un store namespacé via
|
|
135
|
+
`createRedisRateLimitStore({ redisUrl, prefix })` :
|
|
136
|
+
|
|
137
|
+
```js
|
|
138
|
+
const { createRedisRateLimitStore } = require('@astratra/security');
|
|
139
|
+
|
|
140
|
+
createSaasApp({
|
|
141
|
+
// ...
|
|
142
|
+
apiRateLimit: {
|
|
143
|
+
store: createRedisRateLimitStore({ redisUrl, prefix: 'mon-app:rate:api:' })
|
|
144
|
+
},
|
|
145
|
+
loginRateLimit: {
|
|
146
|
+
store: createRedisRateLimitStore({ redisUrl, prefix: 'mon-app:rate:connexion:' })
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
```
|
|
150
|
+
|
|
132
151
|
Le cookie CSRF (`astratra_csrf`) est amorcé automatiquement sur toute
|
|
133
152
|
requête sûre (GET/HEAD/OPTIONS) dès le démarrage de l'app — y compris tes
|
|
134
153
|
propres routes `GET` ajoutées via `extendRoutes` — donc pas besoin de monter
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astratra/saas-kit",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Reusable backend starter kit that assembles Astratra core, security, and AI packages.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@astratra/ai": "^1.0.0",
|
|
28
28
|
"@astratra/core": "^1.0.0",
|
|
29
|
-
"@astratra/security": "^1.
|
|
29
|
+
"@astratra/security": "^1.7.0",
|
|
30
30
|
"express": "^4.18.3",
|
|
31
31
|
"express-validator": "^7.3.2",
|
|
32
32
|
"jsonwebtoken": "^9.0.2"
|