You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Jeffrey Witt <je...@gmail.com> on 2015/06/02 18:52:36 UTC
How to enable CORS on Fuseki2
Hi,
I just updated to Fuseki2 from Fuseki1. With Fuseki1 I was enjoying the
enabled CORS support, especially important for javascript only, single page
apps.
But, as I¹ve gleaned from this post:
https://issues.apache.org/jira/browse/JENA-652 CORS is not enabled by
default for Fueski2. I wonder if it is now possible to enable CORS for
Fueski2. If so could someone guide me through the enabling process.
(I have little to no experience with writing in Java, so I might need
detailed instructions).
Thanks in advance.
jw
--
Dr. Jeffrey C. Witt
Philosophy Department
Loyola University Maryland
4501 N. Charles St.
Baltimore, MD 21210
www.jeffreycwitt.com <http://www.jeffreycwitt.com/>
Re: How to enable CORS on Fuseki2
Posted by Andy Seaborne <an...@apache.org>.
On 02/06/15 17:52, Jeffrey Witt wrote:
> Hi,
> I just updated to Fuseki2 from Fuseki1. With Fuseki1 I was enjoying the
> enabled CORS support, especially important for javascript only, single page
> apps.
>
> But, as I¹ve gleaned from this post:
> https://issues.apache.org/jira/browse/JENA-652 CORS is not enabled by
> default for Fueski2. I wonder if it is now possible to enable CORS for
> Fueski2. If so could someone guide me through the enabling process.
>
> (I have little to no experience with writing in Java, so I might need
> detailed instructions).
>
> Thanks in advance.
> jw
>
Hi there,
You'r right - CORS is not enabled in Fuseki2. It would eb re
if you are deploying Fuseki2 with the standalone server jar
(fuseki-server.jar), not the WAR file, you can follow the instructions
for Jetty [1] to enable it (no Java required, editing web.xml is required).
The web.xml file is in webapp/WEB-INF/web.xml of what usually FUSEKI_HOME
The war file can also be done - it needs unpacking, changing web.xml and
repacking.
-----------
There's machinery in Fuseki2 for this (and a request routing problem -
now being fixed).
What would help me is someone with experience to advise what the headers
should be for the various options and especially whether one choice of
settings is good for everyone or whether this needs configuration in
some way. Even if the latter, what is the best out-of-the-box settings?
If it is one universal set of settings, is better (safe) to do in
Fuseki2 or, for example when running in Tomcat, should Tomcat do it?
Andy
[1]
http://www.eclipse.org/jetty/documentation/current/cross-origin-filter.html