Repository: incubator-zeppelin Updated Branches: refs/heads/master 18fa33a9b -> c7b6eb6fb
Fix duplicate CORS header problem ### What is this PR for? It attempts to solve cause of the duplicated CORS headers problem that was introduced by #831 and was tried to be solved as hotfix in #863 ### What type of PR is it? Bug Fix ### Todos * [x] - remove second `addFilter` to the same context ### What is the Jira issue? ### How should this be tested? same as in #863 ### Screenshots (if appropriate)  ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Khalid Huseynov <[email protected]> Closes #867 from khalidhuseynov/fix/duplicate-cors-header and squashes the following commits: 88f094b [Khalid Huseynov] fix indentation e3bfd57 [Khalid Huseynov] fix double adding cors to webapp context Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/c7b6eb6f Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/c7b6eb6f Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/c7b6eb6f Branch: refs/heads/master Commit: c7b6eb6fb82f42bb31fa84283a5300a6f953626f Parents: 18fa33a Author: Khalid Huseynov <[email protected]> Authored: Fri Apr 29 16:18:32 2016 +0900 Committer: Lee moon soo <[email protected]> Committed: Sat Apr 30 00:43:38 2016 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/zeppelin/server/ZeppelinServer.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/c7b6eb6f/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 13be8b3..f03fbeb 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 @@ -190,7 +190,7 @@ public class ZeppelinServer extends Application { } private static void setupNotebookServer(WebAppContext webapp, - ZeppelinConfiguration conf) { + ZeppelinConfiguration conf) { notebookWsServer = new NotebookServer(); String maxTextMessageSize = conf.getWebsocketMaxTextMessageSize(); final ServletHolder servletHolder = new ServletHolder(notebookWsServer); @@ -200,9 +200,6 @@ public class ZeppelinServer extends Application { ServletContextHandler.SESSIONS); webapp.addServlet(servletHolder, "/ws/*"); - webapp.addFilter(new FilterHolder(CorsFilter.class), "/*", - EnumSet.allOf(DispatcherType.class)); - } private static SslContextFactory getSslContextFactory(ZeppelinConfiguration conf) { @@ -249,7 +246,7 @@ public class ZeppelinServer extends Application { } private static WebAppContext setupWebAppContext(ContextHandlerCollection contexts, - ZeppelinConfiguration conf) { + ZeppelinConfiguration conf) { WebAppContext webApp = new WebAppContext(); webApp.setContextPath(conf.getServerContextPath());
