[object Object]

← back to La Socrata Ingester

rate-limit: prompt for token interactively when none supplied (avoids <bracket> shell-redirect trap)

eb450258ee7374ba98c9513fbb476c11db4f2b60 · 2026-08-12 10:50:09 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit eb450258ee7374ba98c9513fbb476c11db4f2b60
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Aug 12 10:50:09 2026 -0700

    rate-limit: prompt for token interactively when none supplied (avoids <bracket> shell-redirect trap)
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 scripts/apply-ratelimit.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/apply-ratelimit.sh b/scripts/apply-ratelimit.sh
index ec53629..eea74d6 100755
--- a/scripts/apply-ratelimit.sh
+++ b/scripts/apply-ratelimit.sh
@@ -30,7 +30,14 @@ if [ "${DRY_RUN:-0}" = "1" ]; then
   exit 0
 fi
 
-[ -n "$TOKEN" ] || { echo "Set CLOUDFLARE_WAF_TOKEN (Zone>WAF>Edit scope) or run DRY_RUN=1 to preview"; exit 1; }
+# No token yet? If we're on a real terminal, prompt for it (hidden). This avoids
+# the shell trap of typing  CLOUDFLARE_WAF_TOKEN=<token>  where the angle brackets
+# are read as a file redirect. Just run:  bash scripts/apply-ratelimit.sh
+if [ -z "$TOKEN" ] && [ -t 0 ]; then
+  read -rs -p "Paste Cloudflare WAF token (Zone>WAF>Edit, agentabrams.com), then Enter: " TOKEN
+  echo
+fi
+[ -n "$TOKEN" ] || { echo "No token. Set CLOUDFLARE_WAF_TOKEN, pass it as \$1, or run DRY_RUN=1 to preview."; exit 1; }
 auth=(-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json")
 
 # 1. read the current http_ratelimit entrypoint (ruleset id + rules)

← d2328d9 add rentv LinkedIn enricher via openclaw (dedup by firm, pri  ·  back to La Socrata Ingester  ·  Viewer: CSV export of current filtered view + fix blank Issu d5d5fec →