From 430bbe11d56b3f8ae7583c5d2ad289308d18b411 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 11 Jul 2023 12:35:22 -0600 Subject: [PATCH] Remove instance API urls when testing for cf proxy This is related to the previous commit, where instances can now specify a separate API url. Since users aren't visiting the API urls directly, however, they shouldn't be included in the cf proxy test. --- tools/un-cloudflare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/un-cloudflare.sh b/tools/un-cloudflare.sh index 3dc3beb..1b0440a 100755 --- a/tools/un-cloudflare.sh +++ b/tools/un-cloudflare.sh @@ -6,7 +6,7 @@ file="services-full.json" while read -r line; do if [[ "$line" == "\"https://"* ]]; then - domain=$(echo "$line" | sed -e "s/^\"https:\/\///" -e "s/\",//" -e "s/\"//") + domain=$(echo "$line" | sed -e "s/^\"https:\/\///" -e "s/\",//" -e "s/\"//" | awk -F '|' '{print $1}') ips=$(dig "$domain" +short || true) cf=0 echo "$domain"