mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
don't parse feeds that are too large to prevent memory issues
This commit is contained in:
@@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.dropwizard.core.Configuration;
|
||||
import io.dropwizard.db.DataSourceFactory;
|
||||
import io.dropwizard.util.DataSize;
|
||||
import io.dropwizard.util.Duration;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.Min;
|
||||
@@ -154,6 +155,10 @@ public class CommaFeedConfiguration extends Configuration {
|
||||
@Valid
|
||||
private Integer maxFeedsPerUser = 0;
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
private DataSize maxFeedResponseSize = DataSize.megabytes(5);
|
||||
|
||||
@NotNull
|
||||
@Min(0)
|
||||
@Valid
|
||||
|
||||
Reference in New Issue
Block a user