You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@marmotta.apache.org by "Sergio Fernández (JIRA)" <ji...@apache.org> on 2015/05/04 10:08:06 UTC

[jira] [Commented] (MARMOTTA-609) CORS filter not working

    [ https://issues.apache.org/jira/browse/MARMOTTA-609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526390#comment-14526390 ] 

Sergio Fernández commented on MARMOTTA-609:
-------------------------------------------

OK, two things: 

* On the one hand I was wrong, root does not need to be CORS-enabled, just some concrete endpoints ({{/resource}}, {{/ldp}}, {{/sparql}} and {{ldpath}} mainly.

* On the other, as the [doc says|http://enable-cors.org/server.html], many js libs just need {{Access-Control-Allow-Origin: *}}, which is currently missing:

{code}
$ curl -I http://localhost:8080/ldp/
HTTP/1.1 200 OK
Server: Apache Marmotta/3.4.0-SNAPSHOT (build 2+)
Accept-Patch: application/rdf-patch
Accept-Post: text/turtle, application/ld+json, application/rdf+xml, text/n3, */*
Allow: POST, PATCH, GET, OPTIONS, PUT, HEAD
ETag: W/"1430726640000"
Date: Mon, 04 May 2015 08:04:01 GMT
{code}

> CORS filter not working
> -----------------------
>
>                 Key: MARMOTTA-609
>                 URL: https://issues.apache.org/jira/browse/MARMOTTA-609
>             Project: Marmotta
>          Issue Type: Bug
>            Reporter: Sergio Fernández
>            Priority: Critical
>             Fix For: 3.4.0
>
>
> I've just realized that the CORS is not properly working, at least the headers are not present:
> {code}
> $ curl -I http://localhost:8080/
> HTTP/1.1 302 Found
> Server: Apache Marmotta/3.4.0-SNAPSHOT (build 2+)
> Set-Cookie: JSESSIONID=96EA720E9D99FC5633066F25B2ED3799; Path=/; HttpOnly
> Location: http://localhost:8080/core/admin/about.html
> Content-Type: text/html;charset=ISO-8859-1
> Content-Length: 0
> Date: Mon, 04 May 2015 06:53:02 GMT
> {code}
> Not sure if 3.3.0 is also affected, but this is critical since javascript is what people mainly use to build app on top of Marmotta.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)