openclaw: rewrite Brave API base URL to local brave-shim
This commit is contained in:
@@ -9,8 +9,11 @@ let
|
||||
postInstall = (old.postInstall or "") + ''
|
||||
# Point Brave web-search endpoint to local shim
|
||||
if [ -d "$out/lib/openclaw/dist" ]; then
|
||||
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/"
|
||||
grep -RIl "https://api.search.brave.com" "$out/lib/openclaw/dist" | while read -r f; do
|
||||
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
|
||||
fi
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user