Skip to content

fix(electron): allow cross-origin XHR/fetch to asset:// scheme#704

Merged
abose merged 1 commit into
mainfrom
fx
May 13, 2026
Merged

fix(electron): allow cross-origin XHR/fetch to asset:// scheme#704
abose merged 1 commit into
mainfrom
fx

Conversation

@abose
Copy link
Copy Markdown
Member

@abose abose commented May 13, 2026

The asset:// scheme was registered with only supportFetchAPI+stream, which caused Chromium to block XHR/fetch from the phtauri://localhost app origin to asset://localhost/... with a CORS error. Extensions loaded from appLocalData/assets/ failed to load their requirejs-config, keymap, snippets, and HTML panels.

Add standard+secure+corsEnabled to the scheme privileges (matching phtauri and Tauri's wry asset protocol) and set Access-Control-Allow-Origin:* on responses so cross-origin reads from the app are allowed.

The asset:// scheme was registered with only supportFetchAPI+stream,
which caused Chromium to block XHR/fetch from the phtauri://localhost
app origin to asset://localhost/... with a CORS error. Extensions
loaded from appLocalData/assets/ failed to load their requirejs-config,
keymap, snippets, and HTML panels.

Add standard+secure+corsEnabled to the scheme privileges (matching
phtauri and Tauri's wry asset protocol) and set Access-Control-Allow-Origin:*
on responses so cross-origin reads from the app are allowed.
@sonarqubecloud
Copy link
Copy Markdown

@abose abose merged commit ef28255 into main May 13, 2026
3 of 6 checks passed
@abose abose deleted the fx branch May 13, 2026 12:30
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