cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
47.09k stars 3.19k forks source link

Unable to add `img-src`, `font-src` and `style-src` to `experimentalCspAllowList` values #30580

Open cyril-ui-developer opened 2 weeks ago

cyril-ui-developer commented 2 weeks ago

Current behavior

I am unable add img-src, font-src and style-src to experimentalCspAllowList values in cypress.config. I got the error: Expected experimentalCspAllowList to be an array including any of these values: ["script-src-elem", "script-src", "default-src", "form-action", "child-src", "frame-src"]..

Desired behavior

Allow img-src, font-src and style-src in experimentalCspAllowList values with no error

Test code to reproduce

Screenshot 2024-11-07 at 3 13 24 PM

Cypress Version

13.10.0

Node version

18

Operating System

Mac

Debug Logs

Your configFile at /Users/cajieh/Documents/projects/console/frontend/packages/operator-lifecycle-manager/integration-tests-cypress/cypress.config.js set an invalid value:

Expected experimentalCspAllowList to be an array including any of these values: ["script-src-elem", "script-src", "default-src", "form-action", "child-src", "frame-src"].

Instead the value was:

[
  "default-src",
  "script-src",
  "img-src"
]

Other

No response