Commit d70c12e2 by Ryan Baxter

Configuring firewall to allow matrix parameters

parent 8f0c15e9
......@@ -67,6 +67,9 @@ import org.springframework.http.client.ClientHttpResponse;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.mock.http.client.MockClientHttpResponse;
import org.springframework.security.config.annotation.web.WebSecurityConfigurer;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.web.firewall.StrictHttpFirewall;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.LinkedMultiValueMap;
......@@ -406,6 +409,20 @@ public class RestClientRibbonCommandIntegrationTests extends ZuulProxyTestBase {
}
//This is needed to allow semicolon separators used in matrix variables
@Configuration
static class CustomHttpFirewallConfig implements WebSecurityConfigurer<WebSecurity> {
@Override
public void init(WebSecurity webSecurity) throws Exception {}
@Override
public void configure(WebSecurity builder) throws Exception {
StrictHttpFirewall firewall = new StrictHttpFirewall();
firewall.setAllowSemicolon(true);
builder.httpFirewall(firewall);
}
}
static class MyRouteLocator extends DiscoveryClientRouteLocator {
public MyRouteLocator(String servletPath, DiscoveryClient discovery,
......
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