@digitraffic/common 2026.2.5-4 → 2026.2.10-1
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.
|
@@ -14,11 +14,9 @@ const baseHeaders = {
|
|
|
14
14
|
"Accept-Encoding": "gzip",
|
|
15
15
|
Accept: "*/*",
|
|
16
16
|
};
|
|
17
|
+
// Step name can only contain letters, numbers, hyphens, underscores, periods, and spaces
|
|
17
18
|
function sanitizeStepName(url) {
|
|
18
|
-
return url
|
|
19
|
-
.replace(/auth=.*/, "")
|
|
20
|
-
.replace(/\//g, " ")
|
|
21
|
-
.replace(/[?&=]/g, " ");
|
|
19
|
+
return url.replace(/auth=.*/, "").replace(/[^a-zA-Z0-9\-_. ]/g, " ");
|
|
22
20
|
}
|
|
23
21
|
export class UrlChecker {
|
|
24
22
|
requestOptions;
|
|
@@ -56,7 +54,6 @@ export class UrlChecker {
|
|
|
56
54
|
path: url,
|
|
57
55
|
},
|
|
58
56
|
};
|
|
59
|
-
// The step name can only contain letters, numbers, hyphens, underscores, periods, and spaces
|
|
60
57
|
await synthetics.executeHttpStep(`Verify ${statusCode} for ${sanitizeStepName(url)}`, requestOptions, callback);
|
|
61
58
|
}
|
|
62
59
|
expect200(url, ...callbacks) {
|