openclaw: rewrite Brave API base URL to local brave-shim

This commit is contained in:
2026-02-25 21:50:20 +02:00
parent 9a4b06a005
commit c95c70f9d2

View File

@@ -9,8 +9,11 @@ let
postInstall = (old.postInstall or "") + '' postInstall = (old.postInstall or "") + ''
# Point Brave web-search endpoint to local shim # Point Brave web-search endpoint to local shim
if [ -d "$out/lib/openclaw/dist" ]; then if [ -d "$out/lib/openclaw/dist" ]; then
grep -RIl "https://api.search.brave.com/" "$out/lib/openclaw/dist" | while read -r f; do grep -RIl "https://api.search.brave.com" "$out/lib/openclaw/dist" | while read -r f; do
substituteInPlace "$f" --replace-fail "https://api.search.brave.com/" "http://127.0.0.1:8000/" substituteInPlace "$f" \
--replace "https://api.search.brave.com/res/v1/" "http://127.0.0.1:8000/res/v1/" \
--replace "https://api.search.brave.com/" "http://127.0.0.1:8000/" \
--replace-fail "https://api.search.brave.com" "http://127.0.0.1:8000"
done done
fi fi
''; '';