mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: disable CORS when webSecurity is disabled (#25504)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user