Deploying Content-Security-Policy
Content-Security-Policy is delivered over an HTTP header. This means that the web server must include Content-Security-Policy as part of it's response.
The following is a bunch of examples of installing Content Security Policy in different languages/frameworks.
Every library and framework has their own way of setting HTTP headers.
Usually it's as simple as:
Examples
NodeJS / Express
Go
Apache
.htaccess
Nginx
nginx.conf
Django
Report-Only
The first time CSP is rolled out, it is highly recommended to use it in report-only mode.
This means that the browser won't actually block any content, it'll only report. It's great for testing out a new policy.