exguard-backend 1.0.21 → 1.0.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exguard-backend",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -129,7 +129,7 @@ import { Guard } from 'exguard-backend';
129
129
  },
130
130
  timeout: parseInt(process.env.EXGUARD_TIMEOUT || '10000'), // 10 seconds
131
131
  realtime: {
132
- enabled: process.env.EXGUARD_REALTIME_ENABLED === 'true',
132
+ enabled: process.env.EXGUARD_REALTIME_ENABLED === 'true' && !!process.env.EXGUARD_REALTIME_URL && !!process.env.EXGUARD_SERVICE_TOKEN,
133
133
  url: process.env.EXGUARD_REALTIME_URL || undefined,
134
134
  token: process.env.EXGUARD_SERVICE_TOKEN || undefined,
135
135
  },
@@ -643,8 +643,9 @@ EXGUARD_API_URL=http://localhost:3000
643
643
  EXGUARD_CACHE_ENABLED=true
644
644
  EXGUARD_CACHE_TTL=300000
645
645
 
646
- # Optional Realtime Configuration
647
- EXGUARD_REALTIME_ENABLED=false
646
+ # Realtime Configuration (for automatic cache invalidation)
647
+ # Set to true to enable WebSocket connection for real-time RBAC updates
648
+ EXGUARD_REALTIME_ENABLED=true
648
649
  EXGUARD_REALTIME_URL=ws://localhost:3000/realtime
649
650
  EXGUARD_SERVICE_TOKEN=your-service-jwt-token
650
651
  `;