#55172: fix: align protocol.registerSource request handling with protocol.handle
Merged
Created: Oct 21, 2026, 1:28:15 PM
Merged: Oct 21, 2026, 2:27:56 PM
3 comments
Target: main
Description of Change
- Move the renderer request checks
ElectronURLLoaderFactoryperforms into shared helpers and apply them inProtocolSourceURLLoaderFactoryas well, so a scheme served byprotocol.registerSourcetreats rendererfetch()/XHR requests the same way aprotocol.handlescheme does. - Add
registerSourcecases next to the existingprotocol.handleones in the protocol spec.
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
-
npm testpasses - tests are changed or added
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, past tense, and no longer than 80 characters.
Release Notes
Notes: Fixed protocol.registerSource schemes not applying the same fetch rules as protocol.handle schemes.
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron