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.
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-src that falls back to
default-src has 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: