Hello,

I've been working in configuring an Apache Jena Fuseki instance, and I'm in
trouble setting CORS in Fuseki2. When Anon is enabled in Shiro.ini, the
definitions in web.xml of cors work perfectly, but with AuthBasic it
doesn't.
I saw this code implemented in github:
https://github.com/apache/jena/blob/master/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/CrossOriginFilter.java


And seems that I need to change a boolean variable allowCredendials, but
the default value for this variable is false.
The only Variable that may change this is ALLOW_CREDENTIALS_PARAM, but it
is final, I'm not able to change it in web.xml.

My current web.xml is this one:
<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
<init-param>
<param-name>allowedOrigins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>allowedMethods</param-name>
<param-value>GET,POST,DELETE,PUT,HEAD,OPTIONS</param-value>
</init-param>
<init-param>
<param-name>allowedHeaders</param-name>
<param-value>Accept, Origin, X-Requested-With, Content-Type, Last-Modified,
Authorization</param-value>
</init-param>
<init-param>
<param-name>exposedHeaders</param-name>
<param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>cross-origin</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

that i found at:
https://users.jena.apache.narkive.com/ENDI38du/how-to-enable-cors-on-fuseki2


Thank you.

Reply via email to