Skip to content

Commit fe47d48

Browse files
committed
Tweak head request options to fail fast
1 parent b919e7d commit fe47d48

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ping.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ module.exports = async function (url) {
1616
return undefined;
1717
}
1818

19+
if (!url.startsWith('https://')) {
20+
return undefined;
21+
}
22+
1923
return got
20-
.head(url)
24+
.head(url, {
25+
timeout: 500,
26+
retry: 0,
27+
})
2128
.then(async () => {
2229
await cache.set(cacheKey, url);
2330

0 commit comments

Comments
 (0)