Skip to content

Commit ab03a63

Browse files
fix: cloudflare purge (#523)
* fix: cloudflare purge * test: cloudlflare purge * Revert "test: cloudlflare purge" This reverts commit a52b0f5.
1 parent c7375f4 commit ab03a63

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/cdn-cf.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ for FILE in "${FILES}"/*; do
3737
done
3838

3939
# Create JSON payload for Cloudflare API
40-
PURGE_JSON=$(printf '{"files":["%s"]}' "$(IFS='","'; echo "${PURGE_URLS[*]}")")
41-
40+
PURGE_JSON=$(jq -n --argjson urls "$(printf '%s\n' "${PURGE_URLS[@]}" | jq -R . | jq -s .)" '{files: $urls}')
4241
echo "Purging cache via Cloudflare API"
4342
echo "JSON payload: $PURGE_JSON"
4443

0 commit comments

Comments
 (0)