mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-04 20:30:39 +00:00
Fix Limiter: #49
This commit is contained in:
parent
90de8e22a0
commit
3e952fbdb4
3 changed files with 12 additions and 1 deletions
|
@ -83,6 +83,9 @@ def create_app(args):
|
|||
key_func=get_remote_address,
|
||||
default_limits=get_routes_limits(args.req_limit, Database() if args.api_keys else None)
|
||||
)
|
||||
else:
|
||||
from .no_limiter import Limiter
|
||||
limiter = Limiter()
|
||||
|
||||
@app.errorhandler(400)
|
||||
def invalid_api(e):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue