feat: enable code cache for custom protocols (#40544)
This commit is contained in:
parent
85bc005cd6
commit
9aa73abe78
15 changed files with 526 additions and 6 deletions
|
@ -276,6 +276,13 @@ void RendererClientBase::RenderThreadStarted() {
|
|||
blink::SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy(
|
||||
WTF::String::FromUTF8(scheme.data(), scheme.length()));
|
||||
|
||||
std::vector<std::string> code_cache_schemes_list =
|
||||
ParseSchemesCLISwitch(command_line, switches::kCodeCacheSchemes);
|
||||
for (const auto& scheme : code_cache_schemes_list) {
|
||||
blink::WebSecurityPolicy::RegisterURLSchemeAsCodeCacheWithHashing(
|
||||
blink::WebString::FromASCII(scheme));
|
||||
}
|
||||
|
||||
// Allow file scheme to handle service worker by default.
|
||||
// FIXME(zcbenz): Can this be moved elsewhere?
|
||||
if (electron::fuses::IsGrantFileProtocolExtraPrivilegesEnabled()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue