mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-03-04 02:20:19 +01:00
reverted unrelated changes
This commit is contained in:
@@ -121,7 +121,6 @@ public class ApplicationProperties {
|
||||
private String customGlobalAPIKey;
|
||||
private Jwt jwt = new Jwt();
|
||||
private Validation validation = new Validation();
|
||||
private RateLimit rateLimit = new RateLimit();
|
||||
|
||||
public Boolean isAltLogin() {
|
||||
return saml2.getEnabled() || oauth2.getEnabled();
|
||||
@@ -345,12 +344,6 @@ public class ApplicationProperties {
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class RateLimit {
|
||||
private int maxRequests = 1000;
|
||||
private String resetSchedule =
|
||||
"0 0 0 * * MON"; // Cron expression: At 00:00 every Monday
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
@@ -374,7 +374,8 @@ public class SecurityConfiguration {
|
||||
|
||||
@Bean
|
||||
public IPRateLimitingFilter rateLimitingFilter() {
|
||||
int maxRequestsPerIp = securityProperties.getRateLimit().getMaxRequests();
|
||||
// Example limit TODO add config level
|
||||
int maxRequestsPerIp = 1000000;
|
||||
return new IPRateLimitingFilter(maxRequestsPerIp, maxRequestsPerIp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user