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
79b7480f
Commit
79b7480f
authored
Feb 23, 2016
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move servlet detection filter to ZuulConfiguration
It seems like a generic feature to me (not specific to the proxy), so logically it should live in the base class. Fixes gh-844
parent
1a96e594
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
ZuulConfiguration.java
...springframework/cloud/netflix/zuul/ZuulConfiguration.java
+6
-0
ZuulProxyConfiguration.java
...gframework/cloud/netflix/zuul/ZuulProxyConfiguration.java
+2
-7
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/ZuulConfiguration.java
View file @
79b7480f
...
...
@@ -36,6 +36,7 @@ import org.springframework.cloud.netflix.zuul.filters.post.SendResponseFilter;
import
org.springframework.cloud.netflix.zuul.filters.pre.DebugFilter
;
import
org.springframework.cloud.netflix.zuul.filters.pre.FormBodyWrapperFilter
;
import
org.springframework.cloud.netflix.zuul.filters.pre.Servlet30WrapperFilter
;
import
org.springframework.cloud.netflix.zuul.filters.pre.ServletDetectionFilter
;
import
org.springframework.cloud.netflix.zuul.filters.route.SendForwardFilter
;
import
org.springframework.cloud.netflix.zuul.web.ZuulController
;
import
org.springframework.cloud.netflix.zuul.web.ZuulHandlerMapping
;
...
...
@@ -112,6 +113,11 @@ public class ZuulConfiguration {
// pre filters
@Bean
public
ServletDetectionFilter
servletDetectionFilter
()
{
return
new
ServletDetectionFilter
();
}
@Bean
public
FormBodyWrapperFilter
formBodyWrapperFilter
()
{
return
new
FormBodyWrapperFilter
();
}
...
...
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/ZuulProxyConfiguration.java
View file @
79b7480f
...
...
@@ -35,7 +35,6 @@ import org.springframework.cloud.netflix.zuul.filters.discovery.DiscoveryClientR
import
org.springframework.cloud.netflix.zuul.filters.discovery.ServiceRouteMapper
;
import
org.springframework.cloud.netflix.zuul.filters.discovery.SimpleServiceRouteMapper
;
import
org.springframework.cloud.netflix.zuul.filters.pre.PreDecorationFilter
;
import
org.springframework.cloud.netflix.zuul.filters.pre.ServletDetectionFilter
;
import
org.springframework.cloud.netflix.zuul.filters.route.RestClientRibbonCommandFactory
;
import
org.springframework.cloud.netflix.zuul.filters.route.RibbonCommandFactory
;
import
org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter
;
...
...
@@ -86,11 +85,6 @@ public class ZuulProxyConfiguration extends ZuulConfiguration {
// pre filters
@Bean
public
ServletDetectionFilter
servletDetectionFilter
()
{
return
new
ServletDetectionFilter
();
}
@Bean
public
PreDecorationFilter
preDecorationFilter
(
RouteLocator
routeLocator
)
{
return
new
PreDecorationFilter
(
routeLocator
,
this
.
zuulProperties
.
isAddProxyHeaders
());
...
...
@@ -106,7 +100,8 @@ public class ZuulProxyConfiguration extends ZuulConfiguration {
}
@Bean
public
SimpleHostRoutingFilter
simpleHostRoutingFilter
(
ProxyRequestHelper
helper
,
ZuulProperties
zuulProperties
)
{
public
SimpleHostRoutingFilter
simpleHostRoutingFilter
(
ProxyRequestHelper
helper
,
ZuulProperties
zuulProperties
)
{
return
new
SimpleHostRoutingFilter
(
helper
,
zuulProperties
);
}
...
...
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