feat: add CORS middleware and SSE streaming endpoint
Add CORS support for frontend development with configurable origins via CORS_ORIGINS environment variable. Add /chat/stream endpoint for Server-Sent Events streaming with true streaming support for OpenAI adapter and fallback single-chunk behavior for other adapters. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
# LLM Mode: "local", "remote", "openai", or "asksage"
|
||||
LLM_MODE=local
|
||||
|
||||
# CORS Configuration (comma-separated origins for frontend access)
|
||||
CORS_ORIGINS=http://localhost:3000
|
||||
|
||||
# Remote LLM Configuration (required if LLM_MODE=remote)
|
||||
LLM_REMOTE_URL=https://your-llm-service.com/generate
|
||||
LLM_REMOTE_TOKEN=
|
||||
|
||||
Reference in New Issue
Block a user