Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
d70c12e2
Commit
d70c12e2
authored
Feb 07, 2018
by
Ryan Baxter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configuring firewall to allow matrix parameters
parent
8f0c15e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
RestClientRibbonCommandIntegrationTests.java
...e/restclient/RestClientRibbonCommandIntegrationTests.java
+17
-0
No files found.
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/restclient/RestClientRibbonCommandIntegrationTests.java
View file @
d70c12e2
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment