Commit 86705662 authored by Matija Obreza's avatar Matija Obreza

Moved HZ filter: request first goes to hazelcast then spring-security filter chain

parent ec197605
......@@ -92,7 +92,7 @@
<aspectj.version>1.7.2</aspectj.version>
<mysql.version>5.1.31</mysql.version>
<hazelcast.version>3.6</hazelcast.version>
<hazelcast.version>3.6.6</hazelcast.version>
<oval.version>1.81</oval.version>
<jackson.version>2.2.1</jackson.version>
......
......@@ -128,6 +128,15 @@ public class WebAppInitializer implements WebApplicationInitializer {
crossOriginFilter.addMappingForUrlPatterns(null, false, "/api");
crossOriginFilter.addMappingForUrlPatterns(null, false, "/webapi");
// Hazelcast web filter configuration goes first!
FilterRegistration.Dynamic hazelcastWebFilter = servletContext
.addFilter("hazelcastWebFilter", new DelegatingFilterProxy("hazelcastWebFilter"));
hazelcastWebFilter.setInitParameter("targetFilterLifecycle", "true");
hazelcastWebFilter.addMappingForUrlPatterns(
EnumSet.of(DispatcherType.FORWARD, DispatcherType.INCLUDE, DispatcherType.REQUEST), false, "/*");
servletContext.addFilter("springSecurityFilterChain", new DelegatingFilterProxy("springSecurityFilterChain"))
.addMappingForUrlPatterns(null, false, "/*");
......@@ -148,16 +157,6 @@ public class WebAppInitializer implements WebApplicationInitializer {
localeURLFilter.addMappingForUrlPatterns(null, false, "/*");
// Hazelcast web filter configuration
FilterRegistration.Dynamic hazelcastWebFilter = servletContext
.addFilter("hazelcastWebFilter", new DelegatingFilterProxy("hazelcastWebFilter"));
hazelcastWebFilter.setInitParameter("targetFilterLifecycle", "true");
hazelcastWebFilter.addMappingForUrlPatterns(
EnumSet.of(DispatcherType.FORWARD, DispatcherType.INCLUDE, DispatcherType.REQUEST), false, "/*");
// EnvVar filter configuration
// Adds variables to all requests
FilterRegistration.Dynamic envVarFilter = servletContext
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment