agentic-factory-bridge 1.2.0 → 1.2.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/bridge.js +2 -2
- package/package.json +1 -1
package/bridge.js
CHANGED
|
@@ -156,7 +156,7 @@ function requireBridgeAuth(req, res, next) {
|
|
|
156
156
|
|
|
157
157
|
const rateLimitStore = new Map();
|
|
158
158
|
|
|
159
|
-
function rateLimit(key, config) {
|
|
159
|
+
function rateLimit(key, config = { windowMs: 60000, max: 10 }) {
|
|
160
160
|
return (req, res, next) => {
|
|
161
161
|
const ip = req.ip || req.connection.remoteAddress || 'unknown';
|
|
162
162
|
const storeKey = `${key}:${ip}`;
|
|
@@ -669,7 +669,7 @@ app.get('/agents/:name/check', (req, res) => {
|
|
|
669
669
|
app.post(
|
|
670
670
|
'/agents/install',
|
|
671
671
|
requireBridgeAuth,
|
|
672
|
-
rateLimit('install'),
|
|
672
|
+
rateLimit('install', RATE_LIMITS.install),
|
|
673
673
|
express.json(),
|
|
674
674
|
async (req, res) => {
|
|
675
675
|
const { agentId } = req.body;
|