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.
- package/dist/cli.js +5 -1
- 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
|
-
|
|
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 !== "/") {
|