mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 17:31:00 +00:00
Fix require-api-key-origin logic
This commit is contained in:
parent
01a99b3d3e
commit
11ec67663d
1 changed files with 1 additions and 1 deletions
|
@ -243,7 +243,7 @@ def create_app(args):
|
||||||
elif (
|
elif (
|
||||||
args.require_api_key_origin
|
args.require_api_key_origin
|
||||||
and api_keys_db.lookup(ak) is None
|
and api_keys_db.lookup(ak) is None
|
||||||
and not re.match(args.require_api_key_origin, request.headers.get("Origin"))
|
and not re.match(args.require_api_key_origin, request.headers.get("Origin", ""))
|
||||||
):
|
):
|
||||||
description = _("Please contact the server operator to get an API key")
|
description = _("Please contact the server operator to get an API key")
|
||||||
if args.get_api_key_link:
|
if args.get_api_key_link:
|
||||||
|
|
Loading…
Reference in a new issue