Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lumberjack not working when the server has a Content-Security-Policy set #7

Open
ghost opened this issue Feb 12, 2020 · 0 comments
Open

Comments

@ghost
Copy link

ghost commented Feb 12, 2020

When the server to contact has a CSP header set that does not include Cloudflare, it stops working with the following stacktrace:

❯ lumberjack --url https://uberspace.de
⠦ Running accessibility checks... (1 of 1 pages)Error: Refused to load the script 'https://cdnjs.cloudflare.com/ajax/libs/axe-core/3.4.2/axe.min.js' because it violates the following Content Security Policy directive: "script-src 'self' https://dashboard.uberspace.de https://*.uberspace.is https://analyti.uber.space". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

    at Frame._raceWithCSPError (/home/jlnostr/.npm-packages/lib/node_modules/@jakepartusch/lumberjack/node_modules/playwright-core/lib/frames.js:587:19)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async runAccessibilityTestsOnUrl (/home/jlnostr/.npm-packages/lib/node_modules/@jakepartusch/lumberjack/index.js:23:3)
    at async Promise.all (index 0)
    at async runAllChecks (/home/jlnostr/.npm-packages/lib/node_modules/@jakepartusch/lumberjack/index.js:62:38)
    at async main (/home/jlnostr/.npm-packages/lib/node_modules/@jakepartusch/lumberjack/bin/cli.js:30:33)
  -- ASYNC --
    at Frame.<anonymous> (/home/jlnostr/.npm-packages/lib/node_modules/@jakepartusch/lumberjack/node_modules/playwright-core/lib/helper.js:54:23)
    at Page.addScriptTag (/home/jlnostr/.npm-packages/lib/node_modules/@jakepartusch/lumberjack/node_modules/playwright-core/lib/page.js:132:33)
    at Page.<anonymous> (/home/jlnostr/.npm-packages/lib/node_modules/@jakepartusch/lumberjack/node_modules/playwright-core/lib/helper.js:55:31)
    at runAccessibilityTestsOnUrl (/home/jlnostr/.npm-packages/lib/node_modules/@jakepartusch/lumberjack/index.js:23:14)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 0)
    at async runAllChecks (/home/jlnostr/.npm-packages/lib/node_modules/@jakepartusch/lumberjack/index.js:62:38)
    at async main (/home/jlnostr/.npm-packages/lib/node_modules/@jakepartusch/lumberjack/bin/cli.js:30:33)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants