I want to set Content-Security-Policy header in my site.
I found a module to set CSP (I have not tried it yet). But I want to know is there any option available in drupal 8 core itself to set CSP.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
I may be a bit biased in thinking that the Content Security Policy module is the best solution for adding a policy to your site, but here are some of the reasons for using the module:
img-srcthat falls back to
default-srchas the same value, it is omitted)
There are a couple alternatives to the CSP module, if you don't want all of these additional features: