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
8afb02cf
Commit
8afb02cf
authored
Feb 08, 2017
by
Ben Klein
Committed by
GitHub
Feb 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Zuul Developer Guide: minor edits
parent
675e4c10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
spring-cloud-netflix.adoc
docs/src/main/asciidoc/spring-cloud-netflix.adoc
+7
-7
No files found.
docs/src/main/asciidoc/spring-cloud-netflix.adoc
View file @
8afb02cf
...
@@ -1799,22 +1799,22 @@ Error filters:
...
@@ -1799,22 +1799,22 @@ Error filters:
Creates
a
`
DiscoveryClientRouteLocator
`
that
loads
route
definitions
from
a
`
DiscoveryClient
`
(
like
Eureka
),
as
well
as
from
properties
.
A
route
is
created
for
each
`
serviceId
`
from
the
`
DiscoveryClient
`.
As
new
services
are
added
,
the
routes
will
be
refreshed
.
Creates
a
`
DiscoveryClientRouteLocator
`
that
loads
route
definitions
from
a
`
DiscoveryClient
`
(
like
Eureka
),
as
well
as
from
properties
.
A
route
is
created
for
each
`
serviceId
`
from
the
`
DiscoveryClient
`.
As
new
services
are
added
,
the
routes
will
be
refreshed
.
In
addition
to
the
filters
describe
above
,
the
following
filters
are
installed
(
as
normal
Spring
Beans
):
In
addition
to
the
filters
describe
d
above
,
the
following
filters
are
installed
(
as
normal
Spring
Beans
):
Pre
filters
:
Pre
filters
:
-
`
PreDecorationFilter
`:
This
filter
determines
where
and
how
to
route
based
on
the
supplied
`
RouteLocator
`.
It
also
sets
various
proxy
related
headers
for
downstream
requests
.
-
`
PreDecorationFilter
`:
This
filter
determines
where
and
how
to
route
based
on
the
supplied
`
RouteLocator
`.
It
also
sets
various
proxy
-
related
headers
for
downstream
requests
.
Route
filters
:
Route
filters
:
-
`
RibbonRoutingFilter
`:
This
filter
uses
Ribbon
,
Hystrix
and
pluggable
http
clients
to
send
requests
.
Service
ids
are
found
in
the
`
RequestContext
`
attribute
`
FilterConstants
.
SERVICE_ID_KEY
`.
-
`
RibbonRoutingFilter
`:
This
filter
uses
Ribbon
,
Hystrix
and
pluggable
HTTP
clients
to
send
requests
.
Service
ids
are
found
in
the
`
RequestContext
`
attribute
`
FilterConstants
.
SERVICE_ID_KEY
`.
-
Describe
different
ribbon
http
clients
-
Describe
different
Ribbon
HTTP
clients
-
`
SimpleHostRoutingFilter
`:
This
filter
sends
requests
to
predetermined
URLs
via
an
Apache
HttpClient
.
URLs
are
found
in
`
RequestContext
.
getRouteHost
()`.
-
`
SimpleHostRoutingFilter
`:
This
filter
sends
requests
to
predetermined
URLs
via
an
Apache
HttpClient
.
URLs
are
found
in
`
RequestContext
.
getRouteHost
()`.
====
How
to
Write
a
Pre
Filter
====
How
to
Write
a
Pre
Filter
Pre
filters
are
used
to
set
up
data
in
the
`
RequestContext
`
for
use
in
filters
downstream
.
The
main
use
case
is
to
set
information
required
for
route
filters
`
Pre
filters
are
used
to
set
up
data
in
the
`
RequestContext
`
for
use
in
filters
downstream
.
The
main
use
case
is
to
set
information
required
for
route
filters
.
[
source
,
java
]
[
source
,
java
]
----
----
...
@@ -1935,11 +1935,11 @@ public class OkHttpRoutingFilter extends ZuulFilter {
...
@@ -1935,11 +1935,11 @@ public class OkHttpRoutingFilter extends ZuulFilter {
}
}
----
----
The
above
filter
translates
Servlet
request
information
into
OkHttp3
request
information
,
executes
an
http
request
,
then
translates
OkHttp3
reponse
information
to
the
Servlet
response
.
WARNING
:
this
filter
might
have
bugs
and
not
function
correctly
.
The
above
filter
translates
Servlet
request
information
into
OkHttp3
request
information
,
executes
an
HTTP
request
,
then
translates
OkHttp3
reponse
information
to
the
Servlet
response
.
WARNING
:
this
filter
might
have
bugs
and
not
function
correctly
.
====
How
to
Write
a
Post
Filter
====
How
to
Write
a
Post
Filter
Post
filters
typically
manipulate
the
response
.
In
the
filter
below
,
we
add
a
random
`
UUID
`
as
the
`
X
-
Foo
`
header
.
Other
manipulations
,
such
as
transforming
the
response
body
are
much
more
complex
and
compute
intensive
.
Post
filters
typically
manipulate
the
response
.
In
the
filter
below
,
we
add
a
random
`
UUID
`
as
the
`
X
-
Foo
`
header
.
Other
manipulations
,
such
as
transforming
the
response
body
,
are
much
more
complex
and
compute
-
intensive
.
[
source
,
java
]
[
source
,
java
]
----
----
...
...
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