Skip to content

Problem with csp_extra #54

@ElModdy

Description

@ElModdy

I'm trying to add Mathjax support to the theme by adding

tracking:
  script_src:
    - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

csp_extra: "script-src 'self' https://cdn.jsdelivr.net 'unsafe-inline'; style-src 'self' https://cdn.jsdelivr.net; font-src 'self' https://cdn.jsdelivr.net;"

to the config file. The problem is that the page is rendered with

<meta http-equiv="Content-Security-Policy" content="
...
script-src 'self'; script-src 'self' https://cdn.jsdelivr.net 'unsafe-inline'; style-src 'self' https://cdn.jsdelivr.net; font-src 'self' https://cdn.jsdelivr.net;">

where the first script-src 'self'; overrides the second one, so not allowing me anything more than self.
I'd really appreciate any kind of help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions