Hello - I cannot read .json-files as explained in the example below:
https://developer.playcanvas.com/en/tutorials/loading-json/
Within: https://launch.playcanvas.com/749269
I use a link to my webpage that already has CORS permissions?
This is how my json-file looks like:
{ “current_user_url”: “https://api.github.com/user ”,
“current_user_authorizations_html_url”: “https://github.com/settings/connections/applications{/client_id} ”
}
Below " JSON Data from a remote URL"
it only says:
“loading…”
PS: currently testing with other online json-resources
ok, so now I published the project instead - and it works while referring to a json on the same (my) domain.
I am going to mark this as solved soon, but meanwhile; I think it could be very useful to get feedback on the issue of:
Howcome the playcanvas domain (https://developer.playcanvas.com/en/tutorials/loading-json/ ) have a none-sandboxlike/CORS-like connection to the api.github.com-site?
(those are obviously not under same domain)
As such: The deveolper of the example should not write “JSON Data from a remote URL”, but maybe “JSON Data from a parallel domain-URL”?
The console shows the error when you launch it:
You are loading http content from https source so the browser doesn’t allow that.
Either change it so you are using https://kp.futufi.dk or launch using http (ie: http://launch.playcanvas.com/749269 )
ok … nice point - I already tried it on my SSL certificate website - but I guess the trick is:
works by http alone, when url to url within same domain
works by https, when referenced between two completely different sites (both being https-sites)
Thomas_Due_Nielsen:
works by http alone, when url to url within same domain
works by https, when referenced between two completely different sites (both being https-sites)
works by http to http when referenced between two completely different sites
See link posted above: http://launch.playcanvas.com/749269
Edit:
4. works from http to https