Apply DoS filter to /chart too, but relax limit

This commit is contained in:
Sean Owen 2017-03-07 22:27:56 +00:00
parent 8d12dc4155
commit 07479e38ec

View file

@ -43,12 +43,12 @@ import java.util.logging.Logger;
*
* @author Sean Owen
*/
@WebFilter("/w/decode")
@WebFilter({"/w/decode", "/w/chart"})
public final class DoSFilter implements Filter {
private static final Logger log = Logger.getLogger(DoSFilter.class.getName());
private static final int MAX_ACCESSES_PER_IP_PER_TIME = 10;
private static final int MAX_ACCESSES_PER_IP_PER_TIME = 100;
private static final int MAX_RECENT_ACCESS_MAP_SIZE = 100_000;
private final Map<String,AtomicInteger> numRecentAccesses;