@smpx/koa-request 0.4.2 → 0.4.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.
Files changed (2) hide show
  1. package/Request.js +1 -1
  2. package/package.json +1 -1
package/Request.js CHANGED
@@ -1260,7 +1260,7 @@ class Request {
1260
1260
  let host = refererUri.hostname;
1261
1261
  const baseDomain = this.baseDomain();
1262
1262
 
1263
- if (host.endsWith(baseDomain)) {
1263
+ if (host.endsWith(baseDomain) || /^(?:direct|localhost|127|192|172|10)\b/.test(host)) {
1264
1264
  return {
1265
1265
  name: host,
1266
1266
  source: host,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smpx/koa-request",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Handle basic tasks for koajs",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",