@webdecoy/fcaptcha 1.23.0 → 1.24.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webdecoy/fcaptcha",
3
- "version": "1.23.0",
3
+ "version": "1.24.0",
4
4
  "description": "Open source CAPTCHA with PoW, bot detection, and Vision AI protection",
5
5
  "main": "index.js",
6
6
  "exports": {
package/server.js CHANGED
@@ -1640,7 +1640,10 @@ app.post('/api/score', async (req, res) => {
1640
1640
  // the token, so a caller comparing the two sees the same value.
1641
1641
  action: sanitizeAction(action),
1642
1642
  cdata: sanitizeCdata(cdata),
1643
- recommendation: result.recommendation
1643
+ recommendation: result.recommendation,
1644
+ // Parity with /api/verify and with the Go server: a caller denied a token
1645
+ // needs to know which precondition failed.
1646
+ ...(result.reason ? { reason: result.reason } : {})
1644
1647
  });
1645
1648
  });
1646
1649