fix: disable CORS when webSecurity is disabled (#25463)
This commit is contained in:
parent
a200b15600
commit
993eab691f
2 changed files with 36 additions and 1 deletions
|
@ -1507,10 +1507,11 @@ void ElectronBrowserClient::OverrideURLLoaderFactoryParams(
|
|||
const url::Origin& origin,
|
||||
bool is_for_isolated_world,
|
||||
network::mojom::URLLoaderFactoryParams* factory_params) {
|
||||
// Bypass CORB when web security is disabled.
|
||||
// Bypass CORB and CORS when web security is disabled.
|
||||
auto it = process_preferences_.find(factory_params->process_id);
|
||||
if (it != process_preferences_.end() && !it->second.web_security) {
|
||||
factory_params->is_corb_enabled = false;
|
||||
factory_params->disable_web_security = true;
|
||||
}
|
||||
|
||||
extensions::URLLoaderFactoryManager::OverrideURLLoaderFactoryParams(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue