-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MathJax within JSXGraph iframes is not loaded via cors.php resulting in CORS error / broken math rendering #1340
Comments
Hi @ngandrass, |
Note that we cannot, from the STACK side, control the headers of arbitrary addresses. So if you use a local MathJax coming from a custom URL you need to make sure that the webserve servers out those MathJax files with CDN like headers just like the cors-thingy we have for serving some of the other things going into the IFRAME but coming from our sources: moodle-qtype_stack/corsscripts/cors.php Lines 34 to 36 in 37049a9
Those sandbox IFRAMEs require that those headers have been set. In most apache installs simply having in the MathJax folder a
|
Thanks @EJMFarrow and @aharjula for your quick response! Adding the For future readers that uses nginx, add the following to your config and replace
However, I still wonder if it would be a good idea to handle the MathJax include via the already existing moodle-qtype_stack/vle_specific.php Lines 197 to 198 in 37049a9
|
Using MathJax within a JSXGraph applet does not render for me.
The JSXGraph applet is isolated within an iframe which is not able to load the required MathJax libraries due to CORS errors. JSXGraph itself is served via
corsscripts/cors.php
but MathJax is not.MathJax is loaded as follows:
Used software:
How it looks inside the browser:

CORS errors:

Relevant HTML from the JSXGraph iframe:

Maybe related to #1160 since we are using a custom local path for loading MathJax instead of the CDN.
If you need further information or debugging let me know. Thanks a lot!
The text was updated successfully, but these errors were encountered: