This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/UNOMI-180-CXS-GRAPHQLAPI by 
this push:
     new 8369030  UNOMI-180 CDP Specification implementation - Add todo for 
configurability of CORS headers
8369030 is described below

commit 83690306fbb5ed30556530f0a921378f95e48104
Author: sergehuber <shu...@jahia.com>
AuthorDate: Mon May 27 20:32:54 2019 +0200

    UNOMI-180 CDP Specification implementation
    - Add todo for configurability of CORS headers
---
 .../main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java
index 1545aa2..68be5b9 100644
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java
@@ -32,8 +32,6 @@ import graphql.schema.idl.RuntimeWiring;
 import graphql.schema.idl.SchemaGenerator;
 import graphql.schema.idl.SchemaParser;
 import graphql.schema.idl.TypeDefinitionRegistry;
-import org.apache.unomi.api.Event;
-import org.apache.unomi.api.PartialList;
 import org.apache.unomi.api.services.EventService;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.component.annotations.Activate;
@@ -280,6 +278,7 @@ public class CDPSDLServletImpl extends HttpServlet {
      */
     public void setupCORSHeaders(HttpServletRequest httpServletRequest, 
ServletResponse response) throws IOException {
         if (response instanceof HttpServletResponse) {
+            // todo this should be configurable
             HttpServletResponse httpServletResponse = (HttpServletResponse) 
response;
             if (httpServletRequest != null && 
httpServletRequest.getHeader("Origin") != null) {
                 httpServletResponse.setHeader("Access-Control-Allow-Origin", 
httpServletRequest.getHeader("Origin"));

Reply via email to