Skip to content

fix: add try/catch for SSE JSON parsing and tighten CORS default - #134

Open
marceli1404 wants to merge 1 commit into
akemmanuel:masterfrom
marceli1404:fix/sse-crash-and-cors
Open

fix: add try/catch for SSE JSON parsing and tighten CORS default#134
marceli1404 wants to merge 1 commit into
akemmanuel:masterfrom
marceli1404:fix/sse-crash-and-cors

Conversation

@marceli1404

Copy link
Copy Markdown

Changes

  • Wrap JSON.parse(data) in try/catch in SSE event handler to prevent Electron crash on malformed data
  • Change CORS default from wildcard * to http://localhost:3000

Why

Malformed SSE data from the backend would crash the entire Electron main process. The wildcard CORS allows any origin to make requests, which is a security concern.

@marceli1404
marceli1404 force-pushed the fix/sse-crash-and-cors branch from e297037 to 5e7129b Compare July 27, 2026 00:00
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.

1 participant