See the README at fmeum/jekyll-mathjax-csp to see how to use the plugin.
Changes:
csp.conf
which maps the $uri
variable in nginx to $csp
default_csp
option in the config, add [CSP]
in the style-src
to indicate where the style hashes should be added."default-src 'self'; style-src 'self' [CSP];"
csp.conf
into the http block in your nginx config, then inside the server block add add_header Content-Security-Policy $csp always;
Remember to <link> in external stylesheet!
message.csp.conf
into the exclusions inside your _config.yml
, otherwise you will enter an infinite loop.MIT