diff --git a/libretranslate/app.py b/libretranslate/app.py index 4706abd..21f9095 100644 --- a/libretranslate/app.py +++ b/libretranslate/app.py @@ -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: