Skip to content

Commit

Permalink
Merge pull request #776 from foxable/master
Browse files Browse the repository at this point in the history
Disable CORS by default
  • Loading branch information
mmanela authored Nov 29, 2019
2 parents 57de7f6 + 95bd0cd commit ff0ad1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Chutzpah/ChutzpahJSRunners/Chrome/chutzpahRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,12 @@ module.exports.runner = async (onInitialized, onPageLoaded, isFrameworkLoaded, o
chutzpahFunctions.rawLog("!!_!! Using Chrome Install : " + chromeExecutable);
debugLog("Launch Chrome (" + chromeExecutable + "): Elevated= " + isRunningElevated);

// Disable CORS by default
var launchBrowserArges = ["--disable-web-security"];
// If isRunningElevated, we need to turn off sandbox since it does not work with admin users
var launchBrowserArges = isRunningElevated ? ["--no-sandbox"] : [];
if (isRunningElevated) {
launchBrowserArges.push("--no-sandbox");
}
if (browserArgs) {
launchBrowserArges.push(...browserArgs.trim().split(" "));
}
Expand Down

0 comments on commit ff0ad1c

Please sign in to comment.