Skip to content

Commit

Permalink
fix ip address in logs when running reverse proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
callumrollo committed Jul 30, 2024
1 parent a69c76e commit 68fdb85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ COPY --from=unidata-tomcat-image ${CATALINA_HOME}/conf/web.xml ${CATALINA_HOME}/
# Security enhanced server.xml
COPY --from=unidata-tomcat-image ${CATALINA_HOME}/conf/server.xml ${CATALINA_HOME}/conf/

# Enable request attributes so that, when using a reverse proxy, the original
# client ip is recorded in logs rather than the internal proxy ip
RUN sed -i 's/className="org.apache.catalina.valves.AccessLogValve"/className="org.apache.catalina.valves.AccessLogValve" requestAttributesEnabled="true"/g' ${CATALINA_HOME}/conf/server.xml

ARG ERDDAP_VERSION=2.23
ARG ERDDAP_CONTENT_URL=https://github.com/BobSimons/erddap/releases/download/v$ERDDAP_VERSION/erddapContent.zip
ARG ERDDAP_WAR_URL=https://github.com/BobSimons/erddap/releases/download/v$ERDDAP_VERSION/erddap.war
Expand Down

0 comments on commit 68fdb85

Please sign in to comment.