Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Calling healthcheck shouldn't trigger unauthorized log #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ private boolean ipAuthorized(final HttpRequest request) {
new XForwardedFor(xForwardedFor),
proxyChains);
ipAuthorized = client.isAuthorized();
if (ipAuthorized) {
if (log) {
if (log) {
if (ipAuthorized) {
String template = "Ip Authorized client: {}";
Loggers.getLogger(getClass()).info(template, client);
} else {
String template = "Ip Unauthorized client: {}";
Loggers.getLogger(getClass()).error(template, client);
}
} else {
String template = "Ip Unauthorized client: {}";
Loggers.getLogger(getClass()).error(template, client);
}
return ipAuthorized;
}
Expand Down