Hi Colleagues
I am struggling to enable CORS in my VOS 07.20.3229 instance (mounted on Ubuntu 16.04 available at this address http://fairogd.org:8890). I have followed instructions from the documentation (https://enable-cors.org/server_virtuoso.html) and (http://vos.openlinksw.com/owiki/wiki/VOS/VirtTipsAndTricksCORsEnableSPARQLURLs)
But the server keeps rejecting HTTP request from Javascript Client.
Your kind suggestions will be appreciated.
@deoshayo: In you Browser debug output the IP address for the Virtuoso instance is indicated to be 51.38.49.102
, whereas the IP address of the hostname fairogd.org is 104.24.118.60
:
$ ping fairogd.org
PING fairogd.org (104.24.118.60): 56 data bytes
64 bytes from 104.24.118.60: icmp_seq=0 ttl=58 time=46.915 ms
64 bytes from 104.24.118.60: icmp_seq=1 ttl=58 time=56.915 ms
Thus has CORS been setup on the correct server, as you had at least 2 Virtuoso instances as I recall ?
@deoshayo —
I note that the documentation you followed started on a third-party page, instead of our own (upon which that third-party’s page was based). While that third-party page textually matches our own at present, it lacks our clarifying screenshots, and which is not guaranteed to remain in sync with our own docs in future. I strongly recommend that you start with our official documentation before resorting to such third-party coverage.
Also, following on @hwilliams’ comment about your host’s IP address – please note that it is helpful to provide textual info (such as the error log shown above) as text, rather than (or in addition to) screenshots. That would let us copy-and-paste details from the log to do further analysis, rather than taking extra time to transcribe (and hoping not to introduce any new typos). Along similar lines, please note that your log screencap includes several truncations (indicated by …
) which make those messages harder to analyze, and impossible to test locally. Full output, including those full URIs, can be very helpful, and is often necessary, to successful issue analysis and resolution.
I notice that fairogd.org has a round-robin DNS setup, which may also be part of the puzzle you need to solve –
$ host fairogd.org
fairogd.org has address 104.24.118.60
fairogd.org has address 104.24.119.60
fairogd.org has IPv6 address 2606:4700:30::6818:763c
fairogd.org has IPv6 address 2606:4700:30::6818:773c
Please let us know if you are able to resolve this by adjusting your query to target the server(s) at http://fairogd.org:8890/sparql (which are not answering my attempts to connect) and/or by configuring CORS on the server at http://51.38.49.102:8890/sparql (which does appear to be live).