I am having a project, it is built on Angular and is actually a Search Engine. It currently uses DBpedia API to get results about any query being made from the Search bar. Earlier everything was working fine when we were on HTTP server as a response from DBpedia is an HTTP response, but now we have shifted to HTTPS and DBpedia do not offer its API to an HTTPS server. This creates a problem of mixed content as an HTTP request is made to DBpedia. How to deal with this? Is there any way to change this. Can we make a proxy which takes results in HTTP and returns an HTTPS response and then we can use this proxy? Or should I use any other API like Wikidata API(Does Wikidata support response to an HTTPS server?)
Asked
Active
Viewed 64 times
0
-
If DBpedia only offers an HTTP API, I don't think you can do much about that. You can make a proxy but that still leaves you with HTTP traffic between one of your servers (the proxy) and one of theirs. But the DBpedia data is public right? So it shouldn't really be a major issue if it's on HTTP. – Botond Béres May 18 '18 at 19:39
-
1Whenever the project make a call to its API say `http://lookup.dbpedia.org/api/search/KeywordSearch?&QueryString=india` . It shows an error in console that `Mixed Content: The page at 'https://projectname.com/search?query=india&start=0&rows=10&mode=text' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://lookup.dbpedia.org/api/search/KeywordSearch?&QueryString=india'. This request has been blocked; the content must be served over HTTPS` . I searched about this problem and the possible solutions are to change the API. – bro33 May 18 '18 at 19:45
-
Ah I see. In that case - since you cannot really change their API - your best bet probably is indeed to set up an HTTPS proxy service that calls their HTTP API on the server side. – Botond Béres May 18 '18 at 19:48
-
I was also thinking to do the same.I am waiting for any suggestion regarding Wikidata API. – bro33 May 18 '18 at 21:13