Cross-Origin Resource Sharing

whaynes shared this problem 2 years ago
Solved

I was trying to host a Numbas exam containing an embedded Geogebra applet on my personal web server, but it wouldn't load when viewing the web page with Safari. The same page worked correctly on the same computer when viewing with Firefox and Chrome.

The error message I got in the safari console was:


[Error] Cross-origin redirection to https://www.geogebra.org/ap... denied by Cross-Origin Resource Sharing policy: Origin http://www.example.com is not allowed by Access-Control-Allow-Origin.
[Error] Failed to load resource: Cross-origin redirection to https://www.geogebra.org/ap... denied by Cross-Origin Resource Sharing policy: Origin http://www.example.com is not allowed by Access-Control-Allow-Origin. (json.php, line 0)
[Error] XMLHttpRequest cannot load http://www.geogebra.org/api... due to access control checks.
Google didn't provide me any useful hints to solve this so I want to post my solution here in case anyone else runs in to this problem.

The solution that worked for me was to enable ssl on the web server. Now the Geogebra applets render properly on Safari too.

© 2020 International GeoGebra Institute