We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7375f4 commit ab03a63Copy full SHA for ab03a63
scripts/cdn-cf.sh
@@ -37,8 +37,7 @@ for FILE in "${FILES}"/*; do
37
done
38
39
# Create JSON payload for Cloudflare API
40
-PURGE_JSON=$(printf '{"files":["%s"]}' "$(IFS='","'; echo "${PURGE_URLS[*]}")")
41
-
+PURGE_JSON=$(jq -n --argjson urls "$(printf '%s\n' "${PURGE_URLS[@]}" | jq -R . | jq -s .)" '{files: $urls}')
42
echo "Purging cache via Cloudflare API"
43
echo "JSON payload: $PURGE_JSON"
44
0 commit comments