mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 09:21:04 +00:00
Merge pull request #165 from fushinari/key-support-frontend
Expose api_keys in frontend settings
This commit is contained in:
commit
ffc0c1dcda
1 changed files with 4 additions and 0 deletions
|
@ -764,6 +764,9 @@ def create_app(args):
|
|||
frontendTimeout:
|
||||
type: integer
|
||||
description: Frontend translation timeout
|
||||
apiKeys:
|
||||
type: boolean
|
||||
description: Whether the API key database is enabled.
|
||||
keyRequired:
|
||||
type: boolean
|
||||
description: Whether an API key is required.
|
||||
|
@ -801,6 +804,7 @@ def create_app(args):
|
|||
{
|
||||
"charLimit": args.char_limit,
|
||||
"frontendTimeout": args.frontend_timeout,
|
||||
"apiKeys": args.api_keys,
|
||||
"keyRequired": bool(args.api_keys and args.require_api_key_origin),
|
||||
"suggestions": args.suggestions,
|
||||
"filesTranslation": not args.disable_files_translation,
|
||||
|
|
Loading…
Reference in a new issue