routup 1.0.1 → 1.0.3

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.cjs CHANGED
@@ -575,7 +575,8 @@ function getRequestIP(req, options) {
575
575
  const config = useConfig();
576
576
  trustProxy = config.get('trustProxy');
577
577
  }
578
- return proxyAddr(req, trustProxy);
578
+ const addrs = proxyAddr.all(req, trustProxy);
579
+ return addrs[addrs.length - 1];
579
580
  }
580
581
 
581
582
  const ReqMountPathSymbol = Symbol.for('ReqMountPath');
@@ -993,7 +994,7 @@ function sendFile(res, filePath, fn) {
993
994
  }
994
995
 
995
996
  function sendFormat(res, input) {
996
- const { default: formatDefault , ...formats } = input;
997
+ const { default: formatDefault, ...formats } = input;
997
998
  const contentTypes = Object.keys(formats);
998
999
  const contentType = getRequestAcceptableContentType(res.req, contentTypes);
999
1000
  if (contentType) {