From 263c4b9ab4bbd2f98e1237f29644a51bb4f5c00e Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 26 Aug 2014 16:05:10 +0800 Subject: [PATCH] Turn off web security for devtools. --- atom/browser/atom_browser_client.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 8b06e6ddda2c..bfc2ce59b883 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -85,6 +85,12 @@ void AtomBrowserClient::OverrideWebkitPrefs( prefs->allow_displaying_insecure_content = true; prefs->allow_running_insecure_content = true; + // Turn off web security for devtools. + if (url.SchemeIs("chrome-devtools")) { + prefs->web_security_enabled = false; + return; + } + NativeWindow* window = NativeWindow::FromRenderView( render_view_host->GetProcess()->GetID(), render_view_host->GetRoutingID());