Skip to content
Snippets Groups Projects
Unverified Commit 2375cea3 authored by Mufeed Ali's avatar Mufeed Ali
Browse files

Expose api_keys in frontend settings

This is useful for applications that want to know beforehand if usage of
an API key is supported.
parent 922ba5de
No related branches found
No related tags found
No related merge requests found
...@@ -756,6 +756,9 @@ def create_app(args): ...@@ -756,6 +756,9 @@ def create_app(args):
frontendTimeout: frontendTimeout:
type: integer type: integer
description: Frontend translation timeout description: Frontend translation timeout
apiKeys:
type: boolean
description: Whether the API key database is enabled.
keyRequired: keyRequired:
type: boolean type: boolean
description: Whether an API key is required. description: Whether an API key is required.
...@@ -793,6 +796,7 @@ def create_app(args): ...@@ -793,6 +796,7 @@ def create_app(args):
{ {
"charLimit": args.char_limit, "charLimit": args.char_limit,
"frontendTimeout": args.frontend_timeout, "frontendTimeout": args.frontend_timeout,
"apiKeys": args.api_keys,
"keyRequired": bool(args.api_keys and args.require_api_key_origin), "keyRequired": bool(args.api_keys and args.require_api_key_origin),
"suggestions": args.suggestions, "suggestions": args.suggestions,
"filesTranslation": not args.disable_files_translation, "filesTranslation": not args.disable_files_translation,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment