@webdecoy/express 0.5.0 → 0.6.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/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Request, Response, NextFunction, RequestHandler } from 'express';
2
- import { ProtectOptions, WebDecoyConfig, CaptchaEndpointsOptions } from '@webdecoy/node';
2
+ import { EdgeVerdict, ProtectOptions, WebDecoyConfig, CaptchaEndpointsOptions } from '@webdecoy/node';
3
3
  export { CaptchaEndpointsOptions, ProtectResult, RequestMetadata, SDKDetectionResponse, WebDecoyConfig } from '@webdecoy/node';
4
4
 
5
5
  /**
@@ -73,6 +73,8 @@ declare global {
73
73
  detection_id: string;
74
74
  rule_enforced: boolean;
75
75
  };
76
+ /** What the edge validator said about this request (#481). */
77
+ webdecoyEdge?: EdgeVerdict;
76
78
  }
77
79
  }
78
80
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Request, Response, NextFunction, RequestHandler } from 'express';
2
- import { ProtectOptions, WebDecoyConfig, CaptchaEndpointsOptions } from '@webdecoy/node';
2
+ import { EdgeVerdict, ProtectOptions, WebDecoyConfig, CaptchaEndpointsOptions } from '@webdecoy/node';
3
3
  export { CaptchaEndpointsOptions, ProtectResult, RequestMetadata, SDKDetectionResponse, WebDecoyConfig } from '@webdecoy/node';
4
4
 
5
5
  /**
@@ -73,6 +73,8 @@ declare global {
73
73
  detection_id: string;
74
74
  rule_enforced: boolean;
75
75
  };
76
+ /** What the edge validator said about this request (#481). */
77
+ webdecoyEdge?: EdgeVerdict;
76
78
  }
77
79
  }
78
80
  }
package/dist/index.js CHANGED
@@ -107,6 +107,7 @@ function webdecoy(config) {
107
107
  }
108
108
  if (result.allowed) {
109
109
  req.webdecoy = result.detection;
110
+ req.webdecoyEdge = result.edge;
110
111
  return next();
111
112
  } else {
112
113
  return onBlocked(req, res, result.detection);
package/dist/index.mjs CHANGED
@@ -80,6 +80,7 @@ function webdecoy(config) {
80
80
  }
81
81
  if (result.allowed) {
82
82
  req.webdecoy = result.detection;
83
+ req.webdecoyEdge = result.edge;
83
84
  return next();
84
85
  } else {
85
86
  return onBlocked(req, res, result.detection);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webdecoy/express",
3
- "version": "0.5.0",
3
+ "version": "0.6.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.5.0"
43
+ "@webdecoy/node": "^0.6.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "express": "^4.18.0 || ^5.0.0"