Skip to content

Commit 8f381a6

Browse files
committed
Add excluded domains
1 parent 53e2d9f commit 8f381a6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

hack/verify-markdown-link.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,16 @@ extract_external_links() {
4848

4949
validate_url() {
5050
local url="$1"
51-
local http_status=$(curl -o /dev/null -s -w "%{http_code}\n" "$url")
51+
local http_status=$(curl -o /dev/null -s -w "%{http_code}\n" "$url")
52+
local excluded_domains=("foo.ns.service.cluster.local")
53+
54+
# Check if the URL contains any of the excluded domains
55+
for excluded_domain in "${excluded_domains[@]}"; do
56+
if [[ "$url" == *"$excluded_domain"* ]]; then
57+
log_info "Skipping excluded URL: $url"
58+
return 0
59+
fi
60+
done
5261

5362
# Check if the status code indicates success (200-399)
5463
if [[ "$http_status" -ge 200 && "$http_status" -lt 400 ]]; then

0 commit comments

Comments
 (0)