You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by an...@apache.org on 2016/11/05 07:26:30 UTC

zeppelin git commit: [HOT-FIX] - Prevent double injection of cross-origin headers from rest api

Repository: zeppelin
Updated Branches:
  refs/heads/master 4a1a2e48b -> cb175032a


[HOT-FIX] - Prevent double injection of cross-origin headers from rest api

### What is this PR for?
Prevent error `XMLHttpRequest cannot load http://localhost:8080/api/version. The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:9000, http://localhost:9000', but only one is allowed. Origin 'http://localhost:9000' is therefore not allowed access`

### What type of PR is it?
[Hot Fix]

Author: Anthony Corbacho <co...@gmail.com>

Closes #1604 from anthonycorbacho/fix/DoubleOriginInjectionInResponseHeader and squashes the following commits:

b898f85 [Anthony Corbacho] Prevent double injection of cross-origin headers from rest api


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

Branch: refs/heads/master
Commit: cb175032a29f545200680d8fb153f871749e024d
Parents: 4a1a2e4
Author: Anthony Corbacho <co...@gmail.com>
Authored: Sat Nov 5 15:02:11 2016 +0900
Committer: Anthony Corbacho <co...@gmail.com>
Committed: Sat Nov 5 16:26:13 2016 +0900

----------------------------------------------------------------------
 .../src/main/java/org/apache/zeppelin/server/ZeppelinServer.java  | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/cb175032/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java b/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java
index 534e8d4..eec9973 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java
@@ -268,9 +268,6 @@ public class ZeppelinServer extends Application {
       SecurityUtils.initSecurityManager(shiroIniPath);
       webapp.addFilter(ShiroFilter.class, "/api/*", EnumSet.allOf(DispatcherType.class));
       webapp.addEventListener(new EnvironmentLoaderListener());
-    } else {
-      webapp.addFilter(new FilterHolder(CorsFilter.class),
-          "/api/*", EnumSet.allOf(DispatcherType.class));
     }
   }