mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-04 12:24:52 +00:00
Disable suggestions by default
This commit is contained in:
parent
0561deb1b4
commit
0ff3ca65fb
4 changed files with 19 additions and 5 deletions
|
@ -592,6 +592,7 @@ def create_app(args):
|
|||
{
|
||||
"charLimit": args.char_limit,
|
||||
"frontendTimeout": args.frontend_timeout,
|
||||
"suggestions": args.suggestions,
|
||||
"language": {
|
||||
"source": {
|
||||
"code": frontend_argos_language_source.code,
|
||||
|
@ -618,6 +619,9 @@ def create_app(args):
|
|||
@app.route("/suggest", methods=["POST"])
|
||||
@limiter.exempt
|
||||
def suggest():
|
||||
if args.suggestions is False:
|
||||
abort(404)
|
||||
|
||||
q = request.values.get("q")
|
||||
s = request.values.get("s")
|
||||
source_lang = request.values.get("source")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue