💚 Add setting to disable rate limiter
Not exposed on the UI and never will be, but allows us to disable rate limiting on the API for easier E2E testing.
This commit is contained in:
1 parent
3cca3a43f3
commit
b83b57406e
3 files changed
+8
-1
No files matched your search
@@ -1,5 +1,7 @@
|
||||
accessControl:
|
||||
salt: zXmvzI3uWuTLkSPOEfA2ZLwn3f3sGUNS
|
||||
devel:
|
||||
enableRateLimiter: false
|
||||
plugins:
|
||||
virtual_printer:
|
||||
enabled: true
|
||||
|
||||
@@ -1452,7 +1452,11 @@ class Server:
|
||||
|
||||
app.config["RATELIMIT_STRATEGY"] = "fixed-window-elastic-expiry"
|
||||
|
||||
limiter = Limiter(app, key_func=get_remote_address)
|
||||
limiter = Limiter(
|
||||
app,
|
||||
key_func=get_remote_address,
|
||||
enabled=s.getBoolean(["devel", "enableRateLimiter"]),
|
||||
)
|
||||
|
||||
def _setup_i18n(self, app):
|
||||
global babel
|
||||
|
||||
@@ -471,6 +471,7 @@ default_settings = {
|
||||
"showLoadingAnimation": True,
|
||||
"sockJsConnectTimeout": 30,
|
||||
"pluginTimings": False,
|
||||
"enableRateLimiter": True,
|
||||
},
|
||||
}
|
||||
"""The default settings of the core application."""
|
||||
|
||||
Reference in new issue
Block a user