You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a localhost server for sending h5p paths. It took few hours to figure out it does not support localhost urls and to make changes so that it does.
At first I directly added the localhost path (http://localhost:4000) in getJSON method url string. But now I added a regex for localhost urls in urlPath utility. Now its working fine for me.
It would be great to have this in by default. So that new programmers like me won't get headaches.
The text was updated successfully, but these errors were encountered:
h5pJsonPath: '/h5p-folder', it works fine but it will fetch data from public folder of your project. But if we want to get h5p data from a back-end server running on localhost or server running without DNS name like 123.232.424.132 it produces an error it looks for data in /public folder of your project.
Your server should handle the following endpoints:
/h5p.json: This endpoint should return the contents of the h5p.json file in the h5p-folder.
/content.json: Only applies if you haven't provided the contentJsonPath parameter. This endpoint should return the contents of the content.json file.
The the specific implementation details of how to expose this endpoint and fetch the H5P JSON content are outside the scope of this library. However, if you are fetching the data on different url, ensure to enable CORs on that server.
I used this libary with a different approach to avoid the issue. But to clear out what actually happend I will recreate the issue and get back to you with more details asap.
I am using a localhost server for sending h5p paths. It took few hours to figure out it does not support localhost urls and to make changes so that it does.
At first I directly added the localhost path (http://localhost:4000) in getJSON method url string. But now I added a regex for localhost urls in urlPath utility. Now its working fine for me.
It would be great to have this in by default. So that new programmers like me won't get headaches.
The text was updated successfully, but these errors were encountered: