fix: ensure standard schemes are registered in nw service process (#22867)
* fix: ensure standard schemes are registered in nw service process Refs https://github.com/electron/electron/pull/20546 * chore: add test * chore: apply suggestions from code review Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org> Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>
This commit is contained in:
parent
d74ad631e7
commit
bac1c7f532
4 changed files with 66 additions and 8 deletions
|
@ -102,6 +102,11 @@ RendererClientBase::RendererClientBase() {
|
|||
ParseSchemesCLISwitch(command_line, switches::kStandardSchemes);
|
||||
for (const std::string& scheme : standard_schemes_list)
|
||||
url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITH_HOST);
|
||||
// Parse --cors-schemes=scheme1,scheme2
|
||||
std::vector<std::string> cors_schemes_list =
|
||||
ParseSchemesCLISwitch(command_line, switches::kCORSSchemes);
|
||||
for (const std::string& scheme : cors_schemes_list)
|
||||
url::AddCorsEnabledScheme(scheme.c_str());
|
||||
isolated_world_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kContextIsolation);
|
||||
// We rely on the unique process host id which is notified to the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue