Skip to content

Commit

Permalink
Merge pull request #11 from codewise/improve-http-logging
Browse files Browse the repository at this point in the history
Prevent logging sensitive HTTP headers
  • Loading branch information
vladimanaev authored Feb 25, 2019
2 parents ca75c68 + 240b10d commit 75f74e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<log4j.core.version>2.6.1</log4j.core.version>
<retrofit.version>2.5.0</retrofit.version>
<converter.jackson.version>2.3.0</converter.jackson.version>
<logging.interceptor.version>3.9.0</logging.interceptor.version>
<logging.interceptor.version>3.12.1</logging.interceptor.version>
<jackson.databind.version>2.9.8</jackson.databind.version>
<junit.version>4.12</junit.version>
<mockito.all.version>1.10.19</mockito.all.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ private HttpLoggingInterceptor createLoggingInterceptor(CommunicationConfig conf
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(new CommunicationInterceptor());
if(config.isDebug()) {
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
loggingInterceptor.redactHeader("Authorization");
loggingInterceptor.redactHeader("Cookie");
} else {
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BASIC);
}
Expand Down

0 comments on commit 75f74e9

Please sign in to comment.