-
Notifications
You must be signed in to change notification settings - Fork 35
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
Investigate using xdomain to request sysassets files #70
Comments
I'm looking into this issue as solving this will make the development of #71 and #72 much easier. I also suspect that we may need to load subtitle through the same method. One alternative solution to this is to use grunt-curl as a low-tech dependency manager to pull just the elements of sysassets we need. While this makes deployment easier, we would still need to re-deploy sysbuild every time we change sysassets, and thus I don't think this solution is ideal. I've got a fork of sysassets with the xdomain proxy file included. I have a general idea of how to use xdomain. I'm working on transitioning our local file gets into web gets (i.e. |
I've created a pull request to angrave/sysassets to start integrating this change. |
Just to put it out there, using a proxy like RawGit should also solve the cross-site problem, however they are external services which do not guarantee uptime/support. It is better to avoid using an external service if possible, and so xdomain seems like the better option. |
Lesson and chapter data is available in a separate GitHub repository (https://github.com/angrave/sysassets), and published through GitHub pages (http://angrave.github.io/sysassets/). To get those resources, a cross-site request is necessary. Due to security concerns, browsers prevent cross-site requests unless the server sends some CORS headers. However, GitHub pages does not send any such headers, and so, we cannot make requests for those resources.
The current workaround is to bundle those resources with sysbuild when deploying. This approach is not good, because 1) deployment is harder (a person deploying needs to have the relevant sysassets files in their project) and 2) sysbuild needs to be deployed every time content on sysassets changes.
This comment on another issue gives more background about this problem.
xdomain is a JS library providing an alternative to CORS.
From its summary page
This library might be a very good solution for getting files from sysassets.
The text was updated successfully, but these errors were encountered: