Document Proxy Server

Issue gh-4076
This commit is contained in:
Rob Winch 2016-10-17 21:07:57 -05:00
parent badb466cc5
commit 0c35209d77
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,11 @@
[[appendix-proxy-server]]
== Proxy Server Configuration
When using a proxy server it is important to ensure that you have configured your application properly.
For example, many applications will have a load balancer that responds to request for https://example.com/ by forwarding the request to an application server at http://192.168.1:8080
Without proper configuration, the application server will not know that the load balancer exists and treat the request as though http://192.168.1:8080 was requested by the client.
To fix this you can use https://tools.ietf.org/html/rfc7239[RFC 7239] to specify that a load balancer is being used.
To make the application aware of this, you need to either configure your application server aware of the X-Forwarded headers.
For example Tomcat uses the https://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/valves/RemoteIpValve.html[RempteIpValve] and Jetty uses http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/ForwardedRequestCustomizer.html[ForwardedRequestCustomizer].
Alternatively, Spring 4.3+ users can leverage https://github.com/spring-projects/spring-framework/blob/v4.3.3.RELEASE/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java[ForwardedHeaderFilter].

View File

@ -9942,6 +9942,8 @@ Provides Spring Security's JSP tag implementations.
| Required if you are using SPEL expressions in your tag access constraints.
|===
include::{include-dir}/proxy-server.adoc[]
include::{include-dir}/faq.adoc[]
include::{include-dir}/migrating.adoc[]