Skip to content

Commit eb53653

Browse files
committed
Final config
1 parent a668afb commit eb53653

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

webapp/src/EventListener/AddContentSecurityPolicyListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __invoke(ResponseEvent $event): void
1717
// the profiler requires 'unsafe-eval' for script-src 'self'.
1818
$response = $event->getResponse();
1919
$cspExtra = $this->profiler ? "'unsafe-eval'" : "";
20-
$csp = "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' $cspExtra; img-src 'self' data:; worker-src 'self' blob:";
20+
$csp = "font-src 'self' data:; default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' $cspExtra; img-src 'self' data:; worker-src 'self' blob:";
2121
$response->headers->set('Content-Security-Policy', $csp);
2222
}
2323
}

webapp/templates/base.html.twig

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,19 @@
1515
<script src="{{ asset("js/bootstrap.bundle.min.js") }}"></script>
1616
<script>
1717
window.MathJax = {
18-
tex: { inlineMath: [['$', '$'], ['\\(', '\\)']] },
19-
chtml: { fontURL: "{{ app.request.basePath }}/mathjaxfonts" }
18+
tex: {
19+
inlineMath: [['$', '$'], ['\\(', '\\)']]
20+
},
21+
chtml: {
22+
fontURL: "{{ app.request.basePath }}/mathjaxfonts",
23+
scale: 1.0
24+
},
25+
loader: {
26+
paths: {
27+
mathjax: "{{ app.request.basePath }}/mathjax"
28+
},
29+
load: ['input/tex', 'output/chtml']
30+
}
2031
};
2132
</script>
2233
<script src="{{ app.request.basePath }}/mathjax/tex-chtml.js"></script>

0 commit comments

Comments
 (0)