slower 2.1.6 → 2.1.7

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "path-to-regexp": "^6.2.2"
4
4
  },
5
5
  "name": "slower",
6
- "version": "2.1.6",
6
+ "version": "2.1.7",
7
7
  "main": "index.js",
8
8
  "devDependencies": {},
9
9
  "scripts": {
package/src/decorators.js CHANGED
@@ -191,6 +191,9 @@ function setupRequest (request) {
191
191
  host: utils.normalizeAddress(request.socket.localAddress),
192
192
  rhost: utils.normalizeAddress(request.socket.remoteAddress)
193
193
  };
194
+
195
+ // Set express-compatible locals
196
+ request.ip = request.session.rhost;
194
197
 
195
198
 
196
199
  /**
package/src/slower.js CHANGED
@@ -412,6 +412,7 @@ class SlowerMicroRouter {
412
412
  this[verb] = function (...callbacks) {
413
413
  for (let callback of callbacks)
414
414
  this.#setRoute(verb, callback);
415
+ return this;
415
416
  };
416
417
  }
417
418
  }