perf: avoid browser text runtime import

This commit is contained in:
Peter Steinberger
2026-04-23 22:19:17 +01:00
parent 096d2688b7
commit 34c14843af

View File

@@ -1,5 +1,4 @@
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
import WebSocket from "ws";
import { isLoopbackHost } from "../gateway/net.js";
import {
@@ -157,7 +156,7 @@ export function getHeadersWithAuth(url: string, headers: Record<string, string>
try {
const parsed = new URL(url);
const hasAuthHeader = Object.keys(mergedHeaders).some(
(key) => normalizeLowercaseStringOrEmpty(key) === "authorization",
(key) => key.trim().toLowerCase() === "authorization",
);
if (hasAuthHeader) {
return mergedHeaders;