Picto thématique

Rule n° 207 - The website offers a security mechanism that limits the sources of its content.

The server sends a page containing various elements (JavaScript files, CSS, webfonts, etc.) to the browser, which will download and display everything as quickly and efficiently as possible... without questioning the legitimacy of what it is doing. The system called Content Security Policy allows the browser to indicate rules regarding the origin of this content. This makes it possible to determine exactly what it is allowed to execute or display, and thus increases security for users.

#Security #Development


  • Reduce the risk of executing or serving content that is undesirable or that comes from an unauthorized source.


Enable the Content-Security-Policy HTTP header with the appropriate CSP 1 directives:
  • img-src for images


  • script-src for JavaScript

    By Opquast - Read the license