File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
opengrok-web/src/main/java/org/opengrok/web/api/v1/filter Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -107,13 +107,15 @@ public void filter(final ContainerRequestContext context) {
107
107
}
108
108
109
109
if (allowedPaths .contains (path )) {
110
- logger .log (Level .FINEST , "allowing request to {0} based on allowed path" , path );
110
+ logger .log (Level .FINEST , "allowing request to {0} based on whitelisted path" , path );
111
111
return ;
112
112
}
113
113
114
- if (! localAddresses .contains (request .getRemoteAddr ())) {
115
- logger .log (Level .FINEST , "denying request to {0} based on source IP address" , path );
116
- context . abortWith ( Response . status ( Response . Status . UNAUTHORIZED ). build ()) ;
114
+ if (localAddresses .contains (request .getRemoteAddr ())) {
115
+ logger .log (Level .FINEST , "allowing request to {0} based on localhost IP address" , path );
116
+ return ;
117
117
}
118
+
119
+ context .abortWith (Response .status (Response .Status .UNAUTHORIZED ).build ());
118
120
}
119
121
}
You can’t perform that action at this time.
0 commit comments