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
52a3974a
Commit
52a3974a
authored
May 07, 2016
by
Tommy Ludwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typo fixes
parent
cbd398d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
spring-cloud-netflix.adoc
docs/src/main/asciidoc/spring-cloud-netflix.adoc
+16
-16
No files found.
docs/src/main/asciidoc/spring-cloud-netflix.adoc
View file @
52a3974a
...
@@ -1133,8 +1133,8 @@ The location of the backend can be specified as either a "serviceId"
...
@@ -1133,8 +1133,8 @@ The location of the backend can be specified as either a "serviceId"
url: http://example.com/users_service
url: http://example.com/users_service
----
----
These simple url-routes do
esn'
t
get
executed
as
HystrixCommand
nor
can
you
loadbalance
multiple
url
with
Ribbon
.
These simple url-routes do
n'
t
get
executed
as
a
`
HystrixCommand
`
nor
can
you
loadbalance
multiple
URLs
with
Ribbon
.
To
achieve
this
specify
a
service
-
route
and
configure
a
Ribbon
client
for
the
To
achieve
this
,
specify
a
service
-
route
and
configure
a
Ribbon
client
for
the
serviceId
(
this
currently
requires
disabling
Eureka
support
in
Ribbon
:
serviceId
(
this
currently
requires
disabling
Eureka
support
in
Ribbon
:
see
<<
spring
-
cloud
-
ribbon
-
without
-
eureka
,
above
for
more
information
>>),
e
.
g
.
see
<<
spring
-
cloud
-
ribbon
-
without
-
eureka
,
above
for
more
information
>>),
e
.
g
.
...
@@ -1157,7 +1157,7 @@ users:
...
@@ -1157,7 +1157,7 @@ users:
----
----
You
can
provide
convention
between
serviceId
and
routes
using
You
can
provide
convention
between
serviceId
and
routes
using
regexmapper
.
It
uses
regular
expression
named
group
to
extract
regexmapper
.
It
uses
regular
expression
named
group
s
to
extract
variables
from
serviceId
and
inject
them
into
a
route
pattern
.
variables
from
serviceId
and
inject
them
into
a
route
pattern
.
.
ApplicationConfiguration
.
java
.
ApplicationConfiguration
.
java
...
@@ -1173,11 +1173,11 @@ public PatternServiceRouteMapper serviceRouteMapper() {
...
@@ -1173,11 +1173,11 @@ public PatternServiceRouteMapper serviceRouteMapper() {
This
means
that
a
serviceId
"myusers-v1"
will
be
mapped
to
route
This
means
that
a
serviceId
"myusers-v1"
will
be
mapped
to
route
"/v1/myusers/{all}"
.
Any
regular
expression
is
accepted
but
all
named
"/v1/myusers/{all}"
.
Any
regular
expression
is
accepted
but
all
named
group
must
be
present
in
both
servicePattern
and
routePattern
.
If
group
s
must
be
present
in
both
servicePattern
and
routePattern
.
If
servicePattern
do
not
match
a
serviceId
,
the
default
behavior
is
servicePattern
do
es
not
match
a
serviceId
,
the
default
behavior
is
used
.
In
exe
mple
above
,
a
serviceId
"myusers"
will
be
mapped
to
route
used
.
In
the
exa
mple
above
,
a
serviceId
"myusers"
will
be
mapped
to
route
"/myusers/{all}"
(
no
version
detected
)
Th
ese
feature
is
disable
by
"/myusers/{all}"
(
no
version
detected
)
Th
is
feature
is
disable
by
default
and
is
only
applied
to
discovered
services
.
default
and
only
applies
to
discovered
services
.
To
add
a
prefix
to
all
mappings
,
set
`
zuul
.
prefix
`
to
a
value
,
such
as
To
add
a
prefix
to
all
mappings
,
set
`
zuul
.
prefix
`
to
a
value
,
such
as
`/
api
`.
The
proxy
prefix
is
stripped
from
the
request
before
the
`/
api
`.
The
proxy
prefix
is
stripped
from
the
request
before
the
...
@@ -1195,7 +1195,7 @@ the service-specific prefix from individual routes, e.g.
...
@@ -1195,7 +1195,7 @@ the service-specific prefix from individual routes, e.g.
stripPrefix
:
false
stripPrefix
:
false
----
----
In
this
example
requests
to
"/myusers/101"
will
be
forwarded
to
"/myusers/101"
on
the
"users"
service
.
In
this
example
,
requests
to
"/myusers/101"
will
be
forwarded
to
"/myusers/101"
on
the
"users"
service
.
The
`
zuul
.
routes
`
entries
actually
bind
to
an
object
of
type
`
ZuulProperties
`.
If
you
The
`
zuul
.
routes
`
entries
actually
bind
to
an
object
of
type
`
ZuulProperties
`.
If
you
look
at
the
properties
of
that
object
you
will
see
that
it
also
has
a
"retryable"
flag
.
look
at
the
properties
of
that
object
you
will
see
that
it
also
has
a
"retryable"
flag
.
...
@@ -1209,12 +1209,12 @@ prefix path is stripped by default, and the request to the backend
...
@@ -1209,12 +1209,12 @@ prefix path is stripped by default, and the request to the backend
picks
up
a
header
"X-Forwarded-Prefix"
(
"/myusers"
in
the
examples
picks
up
a
header
"X-Forwarded-Prefix"
(
"/myusers"
in
the
examples
above
).
above
).
An
application
with
the
`@
EnableZuulProxy
`
could
act
as
a
standalone
An
application
with
`@
EnableZuulProxy
`
could
act
as
a
standalone
server
if
you
set
a
default
route
(
"/"
),
for
example
`
zuul
.
route
.
home
:
server
if
you
set
a
default
route
(
"/"
),
for
example
`
zuul
.
route
.
home
:
/`
would
route
all
traffic
(
i
.
e
.
"/{all}"
)
to
the
"home"
service
.
/`
would
route
all
traffic
(
i
.
e
.
"/{all}"
)
to
the
"home"
service
.
If
more
fine
-
grained
ignoring
is
needed
,
you
can
specify
specific
patterns
to
ignore
.
If
more
fine
-
grained
ignoring
is
needed
,
you
can
specify
specific
patterns
to
ignore
.
These
patterns
are
being
evaluated
at
the
start
of
the
route
location
process
,
which
These
patterns
are
evaluated
at
the
start
of
the
route
location
process
,
which
means
prefixes
should
be
included
in
the
pattern
to
warrant
a
match
.
Ignored
patterns
means
prefixes
should
be
included
in
the
pattern
to
warrant
a
match
.
Ignored
patterns
span
all
services
and
supersede
any
other
route
specification
.
span
all
services
and
supersede
any
other
route
specification
.
...
@@ -1247,7 +1247,7 @@ only one of the downstream services sets cookies, then you might be
...
@@ -1247,7 +1247,7 @@ only one of the downstream services sets cookies, then you might be
able
to
let
them
flow
from
the
backend
all
the
way
up
to
the
able
to
let
them
flow
from
the
backend
all
the
way
up
to
the
caller
.
Also
,
if
your
proxy
sets
cookies
and
all
your
back
end
caller
.
Also
,
if
your
proxy
sets
cookies
and
all
your
back
end
services
are
part
of
the
same
system
,
it
can
be
natural
to
simply
services
are
part
of
the
same
system
,
it
can
be
natural
to
simply
share
them
(
and
for
instance
us
Spring
Session
to
link
them
up
to
some
share
them
(
and
for
instance
us
e
Spring
Session
to
link
them
up
to
some
shared
state
).
Other
than
that
,
any
cookies
that
get
set
by
downstream
shared
state
).
Other
than
that
,
any
cookies
that
get
set
by
downstream
services
are
likely
to
be
not
very
useful
to
the
caller
,
so
it
is
services
are
likely
to
be
not
very
useful
to
the
caller
,
so
it
is
recommended
that
you
make
(
at
least
)
"Set-Cookie"
and
"Cookie"
into
recommended
that
you
make
(
at
least
)
"Set-Cookie"
and
"Cookie"
into
...
@@ -1256,7 +1256,7 @@ for routes that *are* part of your domain, try to think carefully
...
@@ -1256,7 +1256,7 @@ for routes that *are* part of your domain, try to think carefully
about
what
it
means
before
allowing
cookies
to
flow
between
them
and
about
what
it
means
before
allowing
cookies
to
flow
between
them
and
the
proxy
.
the
proxy
.
The
sensitive
headers
can
be
configured
as
a
comma
-
separate
list
per
The
sensitive
headers
can
be
configured
as
a
comma
-
separate
d
list
per
route
,
e
.
g
.
route
,
e
.
g
.
.
application
.
yml
.
application
.
yml
...
@@ -1267,10 +1267,10 @@ route, e.g.
...
@@ -1267,10 +1267,10 @@ route, e.g.
users
:
users
:
path
:
/
myusers
/**
path
:
/
myusers
/**
sensitiveHeaders
:
Cookie
,
Set
-
Cookie
,
Authorization
sensitiveHeaders
:
Cookie
,
Set
-
Cookie
,
Authorization
url
:
https
://
dowstream
url
:
https
://
dow
n
stream
----
----
Sensitive
headers
can
also
be
set
globally
setting
`
zuul
.
sensitiveHeaders
`.
If
`
sensitiveHeaders
`
is
set
on
a
route
,
this
will
override
the
global
`
sensitiveHeaders
`
setting
.
Sensitive
headers
can
also
be
set
globally
by
setting
`
zuul
.
sensitiveHeaders
`.
If
`
sensitiveHeaders
`
is
set
on
a
route
,
this
will
override
the
global
`
sensitiveHeaders
`
setting
.
NOTE
:
this
is
the
default
value
for
`
sensitiveHeaders
`,
so
you
don
't
NOTE
:
this
is
the
default
value
for
`
sensitiveHeaders
`,
so
you
don
't
need to set it unless you want it to be different. N.B. this is new in
need to set it unless you want it to be different. N.B. this is new in
...
@@ -1323,7 +1323,7 @@ locally, e.g. with a normal Spring `@RequestMapping`. Paths in
...
@@ -1323,7 +1323,7 @@ locally, e.g. with a normal Spring `@RequestMapping`. Paths in
`/third/{all}` are also forwarded, but with a different prefix
`/third/{all}` are also forwarded, but with a different prefix
(i.e. `/third/foo` is forwarded to `/3rd/foo`).
(i.e. `/third/foo` is forwarded to `/3rd/foo`).
NOTE: The ignored patt
t
erns aren'
t
completely
ignored
,
they
just
NOTE: The ignored patterns aren'
t
completely
ignored
,
they
just
aren
't handled by the proxy (so they are also effectively forwarded
aren
't handled by the proxy (so they are also effectively forwarded
locally).
locally).
...
...
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