marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wik...@apache.org
Subject [38/51] [abbrv] marmotta git commit: MARMOTTA-609: added Access-Control-Allow-Origin missing header
Date Wed, 01 Jul 2015 10:30:05 GMT
MARMOTTA-609: added Access-Control-Allow-Origin missing header


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/4386bb1e
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/4386bb1e
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/4386bb1e

Branch: refs/heads/MARMOTTA-556
Commit: 4386bb1e92bbfe8397ff216f177e6e41763a90f4
Parents: f8aebac
Author: Sergio Fernández <wikier@apache.org>
Authored: Mon May 4 10:32:45 2015 +0200
Committer: Sergio Fernández <wikier@apache.org>
Committed: Mon May 4 10:32:45 2015 +0200

----------------------------------------------------------------------
 .../apache/marmotta/platform/ldp/webservices/LdpWebService.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/4386bb1e/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/webservices/LdpWebService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/webservices/LdpWebService.java
b/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/webservices/LdpWebService.java
index 46b9cde..faca755 100644
--- a/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/webservices/LdpWebService.java
+++ b/platform/marmotta-ldp/src/main/java/org/apache/marmotta/platform/ldp/webservices/LdpWebService.java
@@ -87,6 +87,7 @@ public class LdpWebService {
     public static final String HTTP_HEADER_PREFER = "Prefer";
     public static final String HTTP_HEADER_PREFERENCE_APPLIED = "Preference-Applied";
     public static final String HTTP_METHOD_PATCH = "PATCH";
+    public static final String HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
 
     private Logger log = org.slf4j.LoggerFactory.getLogger(this.getClass());
 
@@ -668,7 +669,6 @@ public class LdpWebService {
                 return resp.build();
             }
 
-
             Response.ResponseBuilder builder = createResponse(con, Response.Status.OK, resource);
 
             addOptionsHeader(con, resource, builder);
@@ -706,6 +706,9 @@ public class LdpWebService {
             builder.header(HTTP_HEADER_ACCEPT_PATCH, RdfPatchParser.MIME_TYPE);
         }
 
+        //FIXME: this was not supposed to be done by the filter?
+        builder.header(HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN, configurationService.getStringConfiguration("ldp.allow_origin",
"*"));
+
         return builder;
     }
 


Mime
View raw message