mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
* fix: add CORS preflight handler and ACAO header for embed config endpoint
The GET /public/embed/config/{token} endpoint is fetched by external
websites (third-party embed sites). The global CORSMiddleware only covers
first-party origins, so external origins received no Access-Control-Allow-
Origin header, causing browser preflight failures.
Add an OPTIONS /config/{token} handler that validates the origin against the
token's allowed_domains list and returns the appropriate CORS headers.
Also inject Access-Control-Allow-Origin into the GET response via FastAPI's
response parameter so the actual request succeeds cross-origin.
Closes #383
* fix: complete public embed CORS handling
---------
Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| agent_stream.py | ||
| auth.py | ||
| campaign.py | ||
| credentials.py | ||
| folder.py | ||
| knowledge_base.py | ||
| main.py | ||
| node_types.py | ||
| organization.py | ||
| organization_usage.py | ||
| public_agent.py | ||
| public_download.py | ||
| public_embed.py | ||
| reports.py | ||
| s3_signed_url.py | ||
| service_keys.py | ||
| superuser.py | ||
| telephony.py | ||
| tool.py | ||
| turn_credentials.py | ||
| user.py | ||
| webrtc_signaling.py | ||
| workflow.py | ||
| workflow_embed.py | ||
| workflow_recording.py | ||
| workflow_text_chat.py | ||