Hello everyone,
I just wanted to implement CSP and HSTS to my hosted wordpress-site. :)
Http ist completely set off in my domain settings window. There is a valid SSL Cert, comes from letsencryt. everything works fine.
When I try to check, if everything works as expected, Im using this site: https://observatory.mozilla.org/analyze/b33zle.de
As you can see, there is still the "redirection" point missing (not implemented), as I understand.
My .htaccess file is looking as follows:
[COLOR=#b30000]<IfModule mod_headers.c>
Header set Strict-Transport-Security "max-age=63072000; includeSubDomains;" env=HTTPS
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options nosniff
Header set X-Frame-Options SAMEORIGIN
Header set Referrer-Policy "no-referrer"
Header set Permissions-Policy "geolocation=(self 'https://b33zle.de', microphone=())"
[/COLOR]
[COLOR=#b30000]RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} www\.b33zle\.de [NC]
RewriteRule ^(.*)$ https://www\.b33zle\.de%{REQUEST_URI} [R=301,L][/COLOR]
[COLOR=#b30000]
</ifmodule>
# END of Security headers
<IfModule mod_headers.c>
Header set Content-Security-Policy "default-src 'none'; script-src 'self' 'nonce-48kew4665v779r789'; connect-src 'self'; img-src 'self'; style-src 'self' 'unsafe-inline'; media-src 'self'; base-uri 'self'; form-action 'self'; font-src 'self' data:; frame-ancestors 'none'; upgrade-insecure-requests"
</IfModule>
# BEGIN WordPress
[ here is the dynamic wordpress part ]
# END WordPress[/COLOR]
I dont know how to get it work, would anybody help me with this?
Thanks in advance!
DeinVadder