custom X-Content-Security-Policy
Posted: 01 Feb 2013, 17:47
Hello
i wrote a little plug-in that basically replace <latex>some fomula</latex> in multi-text field by an image generated with MathTex
The resulting img tag looks like <img src="http://<mathtex_server_url>/mathtex.cgi?some formula" />
it works pretty well on IE but not on Firefox because of the "X-Content-Security-Policy"
The solution I found is to modify http_security_headers() in http_api (replacing "allow 'self'" by "allow 'self' <mathtex_server_url>")
May it be possible to do this in a less "hacky" way ?
Regards
i wrote a little plug-in that basically replace <latex>some fomula</latex> in multi-text field by an image generated with MathTex
The resulting img tag looks like <img src="http://<mathtex_server_url>/mathtex.cgi?some formula" />
it works pretty well on IE but not on Firefox because of the "X-Content-Security-Policy"
The solution I found is to modify http_security_headers() in http_api (replacing "allow 'self'" by "allow 'self' <mathtex_server_url>")
May it be possible to do this in a less "hacky" way ?
Regards