diff options
author | Anton Tananaev <anton@traccar.org> | 2023-07-01 13:32:03 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-07-01 13:32:03 -0700 |
commit | 7c5df536074e850f8f9e35775ca94fd04c3cdd3a (patch) | |
tree | 1c1f65f336d1ad55afddf164f34770e4a5cb01ee /src/main/java/org/traccar/web | |
parent | 37564d458bb9d4bca9f1634bbe07e1102e0221cd (diff) | |
download | trackermap-server-7c5df536074e850f8f9e35775ca94fd04c3cdd3a.tar.gz trackermap-server-7c5df536074e850f8f9e35775ca94fd04c3cdd3a.tar.bz2 trackermap-server-7c5df536074e850f8f9e35775ca94fd04c3cdd3a.zip |
Configurable API timeout
Diffstat (limited to 'src/main/java/org/traccar/web')
-rw-r--r-- | src/main/java/org/traccar/web/ThrottlingFilter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/web/ThrottlingFilter.java b/src/main/java/org/traccar/web/ThrottlingFilter.java index 054af652f..6d2328562 100644 --- a/src/main/java/org/traccar/web/ThrottlingFilter.java +++ b/src/main/java/org/traccar/web/ThrottlingFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Anton Tananaev (anton@traccar.org) + * Copyright 2022 - 2023 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,6 +39,7 @@ public class ThrottlingFilter extends DoSFilter { if (config.hasKey(Keys.WEB_MAX_REQUESTS_PER_SECOND)) { setMaxRequestsPerSec(config.getInteger(Keys.WEB_MAX_REQUESTS_PER_SECOND)); } + setMaxRequestMs(config.getInteger(Keys.WEB_MAX_REQUEST_SECONDS) * 1000L); } @Override |