Skip to content

fix(security): restrict CORS on progress SSE endpoint (#87)#98

Open
evanclan wants to merge 1 commit into
vas3k:mainfrom
evanclan:fix/progress-sse-cors
Open

fix(security): restrict CORS on progress SSE endpoint (#87)#98
evanclan wants to merge 1 commit into
vas3k:mainfrom
evanclan:fix/progress-sse-cors

Conversation

@evanclan
Copy link
Copy Markdown

@evanclan evanclan commented Jun 3, 2026

Summary

  • Removes the wildcard Access-Control-Allow-Origin: * header from the progress SSE route
  • Keeps the streaming headers required for same-origin EventSource usage

Motivation

The progress endpoint returns user-scoped progress events for authenticated sessions. A wildcard CORS policy allows any origin to read those event-stream responses, which is broader than needed since the UI already connects via same-origin /api/progress/....

Closes #87.

Test plan

  • Start the app and trigger a flow that uses progress updates (file analysis or export)
  • Confirm progress updates still stream correctly in the UI
  • Verify the response no longer includes Access-Control-Allow-Origin: *

Made with Cursor

The progress stream is consumed via same-origin EventSource, so a
wildcard Access-Control-Allow-Origin header is unnecessary and could
expose user-scoped progress events to arbitrary origins.

Fixes vas3k#87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restrict CORS on progress SSE endpoint to avoid cross-origin data exposure

1 participant