You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2020/01/28 15:11:19 UTC

[unomi] 22/27: UNOMI-180 CDP Specification implementation - Add todo for configurability of CORS headers

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

commit c1ea4767cd05a4e140f801d634d9099abf36859f
Author: sergehuber <sh...@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"));