Skip to content

Commit

Permalink
fix: csp flag (#81)
Browse files Browse the repository at this point in the history
Co-authored-by: AutoSponge <paul.grenier@slalom.com>
  • Loading branch information
AutoSponge and AutoSponge committed Dec 1, 2020
1 parent 7c8bddb commit 656fa8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 58 deletions.
5 changes: 3 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const cli = meow(
},
csp: {
type: 'boolean',
default: false,
default: true,
},
aom: {
type: 'boolean',
Expand All @@ -70,6 +70,7 @@ const cli = meow(
);

const { config, browser, headless, csp, js, device, aom, user } = cli.flags;
console.log(cli.flags);
const file = config ? require(resolve(config)) : {};
const use = (path, fallback) => dlv(file, path, fallback);
const normalizedConfig = {
Expand All @@ -78,9 +79,9 @@ const normalizedConfig = {
launch: {
headless: use('launch.headless', headless),
args: use('launch.args', []),
bypassCSP: use('launch.csp', !csp),
},
context: {
bypassCSP: use('context.bypassCSP', csp),
javaScriptEnabled: use('context.javaScriptEnabled', js),
},
device: use('device', device),
Expand Down
59 changes: 3 additions & 56 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 656fa8e

Please sign in to comment.