acpilot 2.0.0 → 2.0.2

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/dist/cli.js +5 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -43565,7 +43565,11 @@ function normalizeUrl(url, baseUrl, allowedHostnames) {
43565
43565
  if (CMS_JUNK_PATTERNS.some((re) => re.test(fullPath))) {
43566
43566
  return null;
43567
43567
  }
43568
- parsed.protocol = "https:";
43568
+ const h = parsed.hostname.toLowerCase();
43569
+ const isLocal = h === "localhost" || h === "127.0.0.1" || h === "::1" || h === "0.0.0.0" || h.startsWith("192.168.") || h.startsWith("10.") || /^172\.(1[6-9]|2\d|3[01])\./.test(h) || h.endsWith(".local") || h.endsWith(".localhost");
43570
+ if (!isLocal) {
43571
+ parsed.protocol = "https:";
43572
+ }
43569
43573
  parsed.hash = "";
43570
43574
  let normalised = parsed.origin.toLowerCase() + parsed.pathname;
43571
43575
  if (normalised.endsWith("/") && parsed.pathname !== "/") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acpilot",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Full ACPilot accessibility scanner for local dev servers",
5
5
  "bin": {
6
6
  "acpilot": "./dist/cli.js"