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
5d2065b3
Commit
5d2065b3
authored
Mar 24, 2016
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some javadocs to ZuulProperties
parent
c57a758e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
1 deletion
+76
-1
ZuulProperties.java
...gframework/cloud/netflix/zuul/filters/ZuulProperties.java
+76
-1
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ZuulProperties.java
View file @
5d2065b3
...
...
@@ -44,36 +44,75 @@ import lombok.NoArgsConstructor;
public
class
ZuulProperties
{
/**
*
* Headers that are generally expected to be added by Spring Security, and hence often
* duplicated if the proxy and the backend are secured with Spring. By default they
* are added to the ignored headers if Spring Security is present.
*/
private
static
final
List
<
String
>
SECURITY_HEADERS
=
Arrays
.
asList
(
"Pragma"
,
"Cache-Control"
,
"X-Frame-Options"
,
"X-Content-Type-Options"
,
"X-XSS-Protection"
,
"Expires"
);
/**
* A common prefix for all routes.
*/
private
String
prefix
=
""
;
/**
* Flag saying whether to strip the prefix from the path before forwarding.
*/
private
boolean
stripPrefix
=
true
;
/**
* Flag for whether retry is supported by default (assuming the routes themselves
* support it).
*/
private
Boolean
retryable
;
/**
* Map of route names to properties.
*/
private
Map
<
String
,
ZuulRoute
>
routes
=
new
LinkedHashMap
<>();
/**
* Flag to determine whether the proxy adds X-Forwarded-* headers.
*/
private
boolean
addProxyHeaders
=
true
;
/**
* Set of service names not to consider for proxying automatically. By default all
* services in the discovery client will be proxied.
*/
private
Set
<
String
>
ignoredServices
=
new
LinkedHashSet
<>();
private
Set
<
String
>
ignoredPatterns
=
new
LinkedHashSet
<>();
/**
* Names of HTTP headers to ignore completely (i.e. leave them out of downstream
* requests and drop them from downstream responses).
*/
private
Set
<
String
>
ignoredHeaders
=
new
LinkedHashSet
<>();
/**
* Path to install Zuul as a servlet (not part of Spring MVC). The servlet is more
* memory efficient for requests with large bodies, e.g. file uploads.
*/
private
String
servletPath
=
"/zuul"
;
private
boolean
ignoreLocalService
=
true
;
/**
* Host properties controlling default connection pool properties.
*/
private
Host
host
=
new
Host
();
/**
* Flag to say that request bodies can be traced.
*/
private
boolean
traceRequestBody
=
true
;
/**
* Flag to say that path elelents past the first semicolon can be dropped.
*/
private
boolean
removeSemicolonContent
=
true
;
public
Set
<
String
>
getIgnoredHeaders
()
{
...
...
@@ -112,18 +151,48 @@ public class ZuulProperties {
@NoArgsConstructor
public
static
class
ZuulRoute
{
/**
* The ID of the route (the same as its map key by default).
*/
private
String
id
;
/**
* The path (pattern) for the route, e.g. /foo/**.
*/
private
String
path
;
/**
* The service ID (if any) to map to this route. You can specify a physical URL or
* a service, but not both.
*/
private
String
serviceId
;
/**
* A full physical URL to map to the route. An alternative is to use a service ID
* and service discovery to find the physical address.
*/
private
String
url
;
/**
* Flag to determine whether the prefix for this route (the path, minus pattern
* patcher) should be stripped before forwarding.
*/
private
boolean
stripPrefix
=
true
;
/**
* Flag to indicate that this route should be retryable (if supported). Generally
* retry requires a service ID and ribbon.
*/
private
Boolean
retryable
;
/**
* List of sensitive headers that are not passed to downstream requests. Defaults
* to a "safe" set of headers that commonly contain user credentials. It's OK to
* remove those from the list if the downstream service is part of the same system
* as the proxy, so they are sharing authentication data. If using a physical URL
* outside your own domain, then generally it would be a bad idea to leak user
* credentials.
*/
private
Set
<
String
>
sensitiveHeaders
=
new
LinkedHashSet
<>(
Arrays
.
asList
(
"Cookie"
,
"Set-Cookie"
,
"Authorization"
));
...
...
@@ -184,7 +253,13 @@ public class ZuulProperties {
@AllArgsConstructor
@NoArgsConstructor
public
static
class
Host
{
/**
* The maximum number of total connections the proxy can hold open to backends.
*/
private
int
maxTotalConnections
=
200
;
/**
* The maximum number of connections that can be used by a single route.
*/
private
int
maxPerRouteConnections
=
20
;
}
...
...
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