Skip to content

Commit 1eed216

Browse files
committed
fix(chat): refuse redirects on the authenticated chat log POST
1 parent 29f5c64 commit 1eed216

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎apps/sim/lib/mothership/chat/chat-log.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ async function sendChatTurn(
100100
},
101101
}
102102

103+
// A redirect would forward X-API-Key to another host and turn the POST into a GET.
103104
const response = await fetch(url, {
104105
method: 'POST',
106+
redirect: 'error',
105107
headers,
106108
body: JSON.stringify({ input }),
107109
signal: AbortSignal.timeout(CHAT_LOG_TIMEOUT_MS),

0 commit comments

Comments
 (0)