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

Support HTTP resources in the browser on an HTTPS page #44

Open
james-martin-jd opened this issue Oct 23, 2019 · 4 comments
Open

Support HTTP resources in the browser on an HTTPS page #44

james-martin-jd opened this issue Oct 23, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@james-martin-jd
Copy link

james-martin-jd commented Oct 23, 2019

I'm working on an application that needs to load vocabularies in order to fetch data, such as a label or a list of subClasses. This worked fine on localhost, but once deployed to a test server the data started failing to load. On investigation, we were getting a CORS issue as we were loading the vocabulary from https://develop.generator.inrupt.com but the vocabulary in question was vcard, which is http://www.w3.org/2006/vcard/ns#. I've used workarounds for this using .from in the past, but in this case the vocabularies are dynamic so it's hard to predict when to use the workaround. Is there a way to bake in a check and workaround? Thanks!

@RubenVerborgh RubenVerborgh added the enhancement New feature or request label Oct 23, 2019
@RubenVerborgh RubenVerborgh changed the title CORS issues when loading non-https vocabularies from https applications Support HTTP resources in the browser on an HTTPS page Oct 23, 2019
@RubenVerborgh
Copy link
Member

@rubensworks I intend to solve this in the dedicated Solid fetcher for Comunica, by keeping a whitelist of domains (such as w3.org) for which we know the HTTP and HTTPS URLs point to the same resources. In other cases, the fetcher should throw an error when receiving an HTTP request when loaded on an HTTPS page.

@james-martin-jd
Copy link
Author

Won't the error throwing rely on #30?

@RubenVerborgh
Copy link
Member

True; but now it goes silent in any case I think (CORS will not answer back).

@rubensworks
Copy link
Contributor

Right, I lost track of #30. If this is urgent, perhaps @joachimvh could have a look at it? I don't think I'll have time to look at this until next year :s

I intend to solve this in the dedicated Solid fetcher for Comunica, by keeping a whitelist of domains (such as w3.org) for which we know the HTTP and HTTPS URLs point to the same resources.

We could actually create a generic actor for this on the Comunica's HTTP bus that handles such a whitelist. May be useful for non-Solid cases as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants