Skip to content
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

Can't access ontology within the browser #34

Open
mkllnk opened this issue Feb 28, 2024 · 5 comments
Open

Can't access ontology within the browser #34

mkllnk opened this issue Feb 28, 2024 · 5 comments

Comments

@mkllnk
Copy link

mkllnk commented Feb 28, 2024

Github release assets are not served from a CDN with proper CORS headers

Javascript running in the browser can't load resources like https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#Piece because Github is not acting as CDN with public access.

Background

Startin'Blox provides and develops web components based on SOLID. We provided our data via an API in DFC format with additions. The framework tries to resolve all resources to obtain their type and associated data. It can't, however, load the Github URIs referenced in the context because Github doesn't server CORS headers like a CDN would do.

Workaround

You can use the browser plugin CORS Everywhere to disable security features checking those headers. In the short term, I'm also exploring copying all the resources. But it would make our data incompatible with others unless we add sameAs associations.

Possible solutions

I recall a conversation with @RaggedStaff that the move back to your own hosting has been considered. Otherwise, Github pages may also provide the headers we need for embedding in other sites.

@RaggedStaff
Copy link

Thanks for the tip @mkllnk !

The CORS Everywhere plugin for Firefox can be found here.

I can't find a Chrome version of CORS Everywhere, but this looks like a similar plugin for Chrome/Chromium

See this update from our tech call on Monday. TL;DR: We're going to use GitHub pages to publish files, and move back to versioned files, rather than "latest"

@RaggedStaff
Copy link

Hi @mkllnk

In other discussions, it has become apparent that we are already using GitHub pages to publish the Ontology repo on http://docs.datafoodconsortium.org. For example, you can view the Business Ontology at http://docs.datafoodconsortium.org/ontology/src/DFC_BusinessOntology.owl

@mkllnk
Copy link
Author

mkllnk commented Mar 12, 2024

That's good, but it doesn't solve the problem just yet. The DFC needs to agree on one hosting place acting as CDN and change all URIs to point there. Otherwise we can't resolve the URIs to the same ontology.

@RaggedStaff RaggedStaff transferred this issue from datafoodconsortium/ontology Mar 21, 2024
@RaggedStaff
Copy link

Just moving this to Taxonomies repo... as measures.rdf is a taxonomy file.

Previous comments still apply.

@RaggedStaff
Copy link

From previous issue:

In other discussions, it has become apparent that we are already using GitHub pages to publish the Ontology repo on http://docs.datafoodconsortium.org/. For example, you can view the Business Ontology at http://docs.datafoodconsortium.org/ontology/src/DFC_BusinessOntology.owl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Icebox ❄
Development

No branches or pull requests

2 participants