Fix to many request filter URL configuration, order and added a config
for the UI. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -48,8 +48,8 @@ public class DosFilter extends OncePerRequestFilter {
|
||||
private final Cache<String, AtomicInteger> writeCountCache = CacheBuilder.newBuilder()
|
||||
.expireAfterAccess(1, TimeUnit.SECONDS).build();
|
||||
|
||||
private final Integer maxRead;
|
||||
private final Integer maxWrite;
|
||||
private final int maxRead;
|
||||
private final int maxWrite;
|
||||
|
||||
private final Pattern whitelist;
|
||||
|
||||
@@ -73,7 +73,7 @@ public class DosFilter extends OncePerRequestFilter {
|
||||
* the header containing the forwarded IP address e.g.
|
||||
* {@code x-forwarded-for}
|
||||
*/
|
||||
public DosFilter(final Integer maxRead, final Integer maxWrite, final String ipDosWhiteListPattern,
|
||||
public DosFilter(final int maxRead, final int maxWrite, final String ipDosWhiteListPattern,
|
||||
final String ipBlackListPattern, final String forwardHeader) {
|
||||
|
||||
this.maxRead = maxRead;
|
||||
|
||||
@@ -40,8 +40,7 @@ public class HawkbitSecurityProperties {
|
||||
private String blacklist = "";
|
||||
|
||||
/**
|
||||
* Name of the http header from which the remote ip is extracted for DDI
|
||||
* connected clients.
|
||||
* Name of the http header from which the remote ip is extracted.
|
||||
*/
|
||||
private String remoteIpHeader = "X-Forwarded-For";
|
||||
|
||||
@@ -98,6 +97,11 @@ public class HawkbitSecurityProperties {
|
||||
private int maxRolloutGroupsPerRollout = 500;
|
||||
|
||||
private final Filter filter = new Filter();
|
||||
private final Filter uiFilter = new Filter();
|
||||
|
||||
public Filter getUiFilter() {
|
||||
return uiFilter;
|
||||
}
|
||||
|
||||
public Filter getFilter() {
|
||||
return filter;
|
||||
|
||||
Reference in New Issue
Block a user