Commit 3b9d4b7
fix: add CORS headers to streaming chat response (#138)
- Add CORS headers to createUIMessageStreamResponse call in handleChatStream
- Add x-api-key to Access-Control-Allow-Headers in getCorsHeaders
- Update handleChatStream test to expect CORS headers
Fixes cross-origin requests to /api/chat endpoint being blocked.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 832df65 commit 3b9d4b7
File tree
3 files changed
+7
-2
lines changed- lib
- chat
- __tests__
- networking
3 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
165 | 170 | | |
166 | 171 | | |
167 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
0 commit comments