Enhances Background Image Loading and External Data Fetching#163
Open
gabrielefronze wants to merge 8 commits into
Open
Enhances Background Image Loading and External Data Fetching#163gabrielefronze wants to merge 8 commits into
gabrielefronze wants to merge 8 commits into
Conversation
…und image handling with elemento-bg protocol
…fetch' IPC handler for secure fetching of POTD metadata
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! |
eafc9b7 to
aa0fb6d
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 directfile://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-fetchIPC 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, andsave-background-from-url) to leverage the newelemento-bgprotocol.@C4lopsitta this is intended to be a repo of "useful" fixes, feel free not to merge it but rather to checrrypick commits.