Add Content Security Policy security header to WordPress site

[ad_1]

Can someone please let me know if I am typing something wrong when I set the CSP in the htaccess file:

<IfModule mod_headers.c> Header set Content-Security-Policy default-src ‘none’; script-src ‘self’; connect-src ‘self’; img-src ‘self’; style-src ‘self’; </IfModule>

I am using a child theme on a VPS with Apache and Nginx.

I am following the recommendations set by a plugin called “Security Ninja”, The CSP is not implemented, I tried restarting Apache, Nginx to no avail.

TIA

[ad_2]
1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer