Hi
I’m attempting to secure my entire domain which includes a
Moodle instance.
I’m attempting to set a Content Security Policy (CSP) at site level with a
directive in the header in accordance with best practice recommendations. Ensure
CSP is effective against XSS attacks
Header directive: Content-Security-Policy: script-src <source>;
Best practice is blocking all third-party scripts or white-listing specific domains but blocking all inline scripts is seen as being particularly safe.
“Note: Disallowing inline styles and inline scripts is one of the biggest security wins CSP provides. However, if you absolutely have to use it, there are a few mechanisms that will allow them.”
CSP: script-src - HTTP | MDN (mozilla.org)
Is there a way in Moodle to disable the use of inline Javascript or white-list scripts using a mechanism such as Nonce or Hash as described in the article above?
Thank you