diff --git a/apps/chat/src/index.ts b/apps/chat/src/index.ts index f808475..cd1f976 100644 --- a/apps/chat/src/index.ts +++ b/apps/chat/src/index.ts @@ -47,8 +47,11 @@ app.get( let apiKey: string | null = null; if (authHeader && authHeader.startsWith('Bearer ')) { apiKey = authHeader.substring(7); - } else if (botAuth) { - apiKey = botAuth; + } else if (botAuth && typeof botAuth === 'string' && botAuth.trim().length > 0) { + // Validate botAuth query parameter format + if (botAuth.startsWith('hctvb_')) { + apiKey = botAuth; + } } if (apiKey) { diff --git a/apps/docs/src/content/docs/api/chat.mdx b/apps/docs/src/content/docs/api/chat.mdx index 4325e66..bacbd72 100644 --- a/apps/docs/src/content/docs/api/chat.mdx +++ b/apps/docs/src/content/docs/api/chat.mdx @@ -15,9 +15,11 @@ You'll need to provide authentication, which can be done by providing an `auth_s