dsh-mobile 0.8.8 → 0.8.9

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/lib/index.mjs CHANGED
@@ -2234,7 +2234,8 @@ function cookie(name, value, options) {
2234
2234
  }
2235
2235
  /** Enforce direct CIDR, exact Host, and browser same-origin facts. */
2236
2236
  function assertExternalTrust(request, policy, requireOrigin) {
2237
- if (!addressAllowed(request.socket.remoteAddress, policy.cidrs) || !policy.acceptsHost(request.headers.host)) throw new HttpError(403, "forbidden");
2237
+ if (!addressAllowed(request.socket.remoteAddress, policy.cidrs)) throw new HttpError(403, "source_network_untrusted");
2238
+ if (!policy.acceptsHost(request.headers.host)) throw new HttpError(403, "forbidden");
2238
2239
  const origin = request.headers.origin;
2239
2240
  if (origin !== void 0 && !policy.acceptsOrigin(origin)) throw new HttpError(403, "forbidden");
2240
2241
  const site = request.headers["sec-fetch-site"];