openclaw: rewrite Brave API base URL to local brave-shim
This commit is contained in:
@@ -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
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user