hifun-tools 1.3.4 → 1.3.6
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/init/utils.js +4 -3
- package/package.json +1 -1
package/dist/init/utils.js
CHANGED
|
@@ -34,9 +34,10 @@ export async function getOptimalDecodedString(encodedArray) {
|
|
|
34
34
|
return resolve(targetArr[0]);
|
|
35
35
|
let hasResolved = false;
|
|
36
36
|
targetArr.forEach((url) => {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const cleanUrl = url.replace(/\/+$/, "");
|
|
38
|
+
const testUrl = `${cleanUrl.startsWith("http")
|
|
39
|
+
? cleanUrl
|
|
40
|
+
: currentProtocol + "//" + cleanUrl}/health?t=${Date.now()}`;
|
|
40
41
|
const controller = new AbortController();
|
|
41
42
|
const timeoutId = setTimeout(() => {
|
|
42
43
|
controller.abort();
|