Skip to content

Commit 4778be2

Browse files
authored
fix ip address in logs with requestAttributesEnable
1 parent 4ecbe85 commit 4778be2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

update-server-xml.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ function set_attribute {
3636
set_attribute /Server/Service/Connector relaxedPathChars "$RELAXED_PATH_CHARS"
3737
set_attribute /Server/Service/Connector relaxedQueryChars "$RELAXED_QUERY_CHARS"
3838

39+
# Enable request attributes so that, when using a reverse proxy, the original
40+
# client ip is recorded in logs rather than the internal proxy ip
41+
set_attribute /Server/Service/Engine/Host/Valve requestAttributesEnable "true"
42+
3943
#create RemoteIpValve if missing. this is needed so ERDDAP knows when its responding to https requests
4044
#end result should look like:
4145
#<Valve className="org.apache.catalina.valves.RemoteIpValve"

0 commit comments

Comments
 (0)