diff --git a/docs/guides/guides/content-security-policy.mdx b/docs/guides/guides/content-security-policy.mdx new file mode 100644 index 00000000000..b02a8ecd56c --- /dev/null +++ b/docs/guides/guides/content-security-policy.mdx @@ -0,0 +1,36 @@ +--- +title: Content Security Policy +e2eSpecific: true +--- + +Content Security Policy (CSP) is a browser security feature that allows you to +restrict the resources that can be loaded into your application. This can be +problematic for Cypress, because it needs to inject JavaScript into your +application in order to run tests and interact with the DOM. This page describes +how Cypress handles CSP and how to configure it to work with your application. + +There are two ways to implement CSP: + +- [Meta tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv) +- [HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) + +The `` tag implementation is fully supported by Cypress without any +configuration required. This is because Cypress loads the necessary `