mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-18 08:27:03 +02:00
Fix require-api-key-origin logic
This commit is contained in:
parent
01a99b3d3e
commit
11ec67663d
@ -243,7 +243,7 @@ def create_app(args):
|
||||
elif (
|
||||
args.require_api_key_origin
|
||||
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")
|
||||
if args.get_api_key_link:
|
||||
|
Loading…
Reference in New Issue
Block a user