@webdecoy/express 0.25.2 → 0.27.0

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 CHANGED
@@ -86,7 +86,10 @@ interface WebDecoyMiddlewareOptions {
86
86
  // 'monitor' (default) records and serves; 'enforce' blocks.
87
87
  mode?: 'monitor' | 'enforce';
88
88
 
89
- // Threat score above which a request counts as blocked (default: 80)
89
+ // Opt in to the synchronous unified ingest verdict.
90
+ decisionMode?: 'legacy' | 'unified_v1';
91
+
92
+ // Minimum confidence to act on the verdict (default: 80 in legacy mode).
90
93
  threatScoreThreshold?: number;
91
94
  // Per-request override of the same threshold
92
95
  threshold?: number;
package/dist/index.js CHANGED
@@ -75,7 +75,8 @@ function webdecoy(config) {
75
75
  const result = await sdk.protect(metadata, {
76
76
  threshold: config.threshold,
77
77
  skipLocalAnalysis: config.skipLocalAnalysis,
78
- metadata: config.metadata
78
+ metadata: config.metadata,
79
+ violationReporting: { mode }
79
80
  });
80
81
  const ht = getToken();
81
82
  if (ht) {
package/dist/index.mjs CHANGED
@@ -56,7 +56,8 @@ function webdecoy(config) {
56
56
  const result = await sdk.protect(metadata, {
57
57
  threshold: config.threshold,
58
58
  skipLocalAnalysis: config.skipLocalAnalysis,
59
- metadata: config.metadata
59
+ metadata: config.metadata,
60
+ violationReporting: { mode }
60
61
  });
61
62
  const ht = getToken();
62
63
  if (ht) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webdecoy/express",
3
- "version": "0.25.2",
3
+ "version": "0.27.0",
4
4
  "description": "Web Decoy middleware for Express.js",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -40,7 +40,7 @@
40
40
  "url": "https://github.com/WebDecoy/node/issues"
41
41
  },
42
42
  "dependencies": {
43
- "@webdecoy/node": "^0.25.2"
43
+ "@webdecoy/node": "^0.27.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "express": "^4.18.0 || ^5.0.0"