Skip to content

Enhances Background Image Loading and External Data Fetching#163

Open
gabrielefronze wants to merge 8 commits into
Elemento-Modular-Cloud:developfrom
gabrielefronze:weekend-fun
Open

Enhances Background Image Loading and External Data Fetching#163
gabrielefronze wants to merge 8 commits into
Elemento-Modular-Cloud:developfrom
gabrielefronze:weekend-fun

Conversation

@gabrielefronze
Copy link
Copy Markdown
Member

Improves how background images and external data are handled for better security and compatibility:

  • Implements Custom Background Protocol: Introduces a custom elemento-bg:// protocol to serve local background images. This replaces the use of direct file:// URLs, addressing security and compatibility issues that arise when the UI is loaded from non-file origins (e.g., an HTTP development server). The protocol includes robust path validation to ensure secure access to local files.

  • Adds CORS-Safe External Fetching: Provides a new cors-safe-fetch IPC handler that enables the renderer process to securely fetch data from whitelisted external hosts (primarily for Picture of the Day metadata). This main-process proxy bypasses browser CORS restrictions while enforcing a strict whitelist of allowed hostnames and protocols for enhanced security.

  • Updates existing IPC handlers (such as list-backgrounds, get-background-data, import-background, and save-background-from-url) to leverage the new elemento-bg protocol.

@C4lopsitta this is intended to be a repo of "useful" fixes, feel free not to merge it but rather to checrrypick commits.

@gabrielefronze gabrielefronze requested a review from C4lopsitta May 11, 2026 14:21
@C4lopsitta C4lopsitta added the wontfix This will not be worked on label May 12, 2026
@C4lopsitta
Copy link
Copy Markdown
Contributor

Thanks for the fixes and improvements. Marked the PR as "wontfix" to remind everyone not to merge this; i'll cherry pick the fixes!

Add mock HTTP servers to emulate Elemento client daemons, enabling Electros
UI development without requiring native ECD binaries. This provides a
consistent and controllable mock data environment.

Updates `--no-daemons` flag description and adds detailed instructions in the README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants