<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>9.0.0 and later</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>macOS 10.13.6</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>8.3.3</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">in BrowserWindow set to do http CORS request<br>
webPreferences: {<br>
webSecurity: false<br>
},<br>
in low version electron, can do CORS request.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Access to XMLHttpRequest at '<a href="https://xxx" rel="nofollow">https://xxx</a>' from origin '<a href="http://localhost:9080" rel="nofollow">http://localhost:9080</a>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.</p>
<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong><br>
12.0.0-beta.21</li>
<li><strong>Operating System:</strong><br>
Windows 10</li>
<li><strong>Last Known Working Electron version:</strong><br>
12.0.0-beta.20</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">No crash.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Crash reported to Sentry using minidump uploader:<br>
<a href="https://sentry.io/share/issue/70e843318a304dae9616805c3223a1cc/" rel="nofollow">https://sentry.io/share/issue/70e843318a304dae9616805c3223a1cc/</a></p>
<h3 dir="auto">To Reproduce this might be enough</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Use Electron.WebRequest .onBeforeRequest(
      {
        urls: [],
      },
      ({ url }, callback) =&gt; {
        if (url.startsWith('https://test..com')) {
          callback({ cancel: true });
        } else {
          callback({ cancel: false });
        }
      },
    );"><pre class="notranslate"><code class="notranslate">Use Electron.WebRequest .onBeforeRequest(
      {
        urls: [],
      },
      ({ url }, callback) =&gt; {
        if (url.startsWith('https://test..com')) {
          callback({ cancel: true });
        } else {
          callback({ cancel: false });
        }
      },
    );
</code></pre></div>