Hello Paul,
header("Content-Security-Policy: script-src 'self'; script-src-elem 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self'; etc, etc, etc");
By including this directive at the beginning of every primary PHP script on my main site, I achieve an A+ rating from the MDN tool.
For MiniBB, it is necessary to add 'unsafe-inline' to `script-src`; otherwise, JavaScript code essential for the forum's operation gets blocked. With this change, MiniBB receives a B+ rating, which is good.
Just have to put this directive at the beginning of index.php and the main admin script.
For me this discussion is achieved.
Thank you. |