mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 08:10:21 +00:00
refactor: dedupe google chat lowercase helpers
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
|
||||
import {
|
||||
readJsonWebhookBodyOrReject,
|
||||
resolveWebhookTargetWithAuthOrReject,
|
||||
@@ -22,7 +23,7 @@ function extractBearerToken(header: unknown): string {
|
||||
: typeof header === "string"
|
||||
? header
|
||||
: "";
|
||||
return authHeader.toLowerCase().startsWith("bearer ")
|
||||
return normalizeLowercaseStringOrEmpty(authHeader).startsWith("bearer ")
|
||||
? authHeader.slice("bearer ".length).trim()
|
||||
: "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user