@webdecoy/express 0.17.0 → 0.18.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
@@ -106,6 +106,8 @@ app.use(
106
106
  );
107
107
  ```
108
108
 
109
+ On Railway, use `trustProxy: 'railway'` (or `app.set('trust proxy', 2)`). Railway's edge writes `X-Forwarded-For: <client>, <edge>`, so trusting one hop records Railway's edge as every visitor.
110
+
109
111
  ## Custom Block Handler
110
112
 
111
113
  ```typescript
package/dist/index.d.mts CHANGED
@@ -40,7 +40,7 @@ interface WebDecoyMiddlewareOptions extends ProtectOptions {
40
40
  * Leave this unset and Express decides: `req.ip` already honours the app's own
41
41
  * `trust proxy` setting, which defaults to the socket address. Set it to
42
42
  * override that for WebDecoy alone — a number of trusted hops, `'cloudflare'`,
43
- * or CIDRs of your proxies.
43
+ * `'railway'`, or CIDRs of your proxies.
44
44
  *
45
45
  * THIS CHANGED IN 0.12.0, and it is a behaviour change worth reading.
46
46
  *
package/dist/index.d.ts CHANGED
@@ -40,7 +40,7 @@ interface WebDecoyMiddlewareOptions extends ProtectOptions {
40
40
  * Leave this unset and Express decides: `req.ip` already honours the app's own
41
41
  * `trust proxy` setting, which defaults to the socket address. Set it to
42
42
  * override that for WebDecoy alone — a number of trusted hops, `'cloudflare'`,
43
- * or CIDRs of your proxies.
43
+ * `'railway'`, or CIDRs of your proxies.
44
44
  *
45
45
  * THIS CHANGED IN 0.12.0, and it is a behaviour change worth reading.
46
46
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webdecoy/express",
3
- "version": "0.17.0",
3
+ "version": "0.18.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.17.0"
43
+ "@webdecoy/node": "^0.18.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "express": "^4.18.0 || ^5.0.0"