Moodle Plugins directory: Content security policy | Moodle.org

Content security policy
This plugin allows you to configure a Custom Security Policy (CSP) which is sent via HTTP headers. CSP headers instruct browsers to make certain actions. For example, if a website is available by HTTPS, then a CSP policy of 'default https:;' will tell the browser to prohibit loading of any sources (scripts, css etc.) via HTTP.
Learn more about CSP here:
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
There are many other CSP rules that browsers can understand and by using them administrators can flexibly tune their website if they wanted to get rid of mixed content or classes of cross-site scripting vulnerabilities.
Any policy you wish to use can be safely tested first using 'Report only' mode, and this plugin has a built in CSP aggregator and reports all errors which are raised. You can have two different policies, one for testing and one for enforcing and gradually move each directive from 'report' to 'enforcing' after the various issues have been found and fixed.
1. The https://github.com/moodlerooms/moodle-tool_httpsreplace reported a far greater number of potentially problematic domains than the CSP violation report did. I guess I'd have to dig around in the code to find out what each is doing exactly to determine why but if anyone has an idea about this that would be very helpful!
2. I generated a few pages of CSP violation reports, made some changes and reset all statistics. I think perhaps that was not the correct thing to do. Our system technically should be producing the same report it did initially but since I reset statistics I can't seem to find a way to make this happen. I've cleared caches and disabled and re-enabled the plug-in. I can't find anything in the documentation about this. Am I missing something? TIA!
Does this plug-in work with IE-11?
I can block content in Chrome and FFox so far but same content not blocked in IE-11.
TIA!!
Have you actually tested it in 3.3? I'd be surprised if it didn't work as-is in 3.3 but I haven't tested it myself. If there is any issues under 3.3 can you please raise them here https://github.com/catalyst/moodle-local_csp/issues
thanks
May I have the list of what CSP is supported in this plugin? Thank you.
https://github.com/catalyst/moodle-local_csp/issues/77
So, install the version from https://github.com/catalyst/moodle-local_csp. This https://moodle.org/plugins/local_csp page doesn't always have the latest version of the plugin.
Let me have a question. I may mis-understand something.
--
I made this setting. It seems nice for testing cookies.
"HttpOnly;Secure;SameSite=Strict"
But it seems no effect for this value.
Set-Cookie: MoodleSession
The cookie is "secure; SameSite=None".
Close my post.