mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 01:11:00 +00:00
parent
5c3cf0a392
commit
6e05a04ff9
2 changed files with 2 additions and 3 deletions
|
@ -135,9 +135,9 @@ def create_app(args):
|
|||
ak = json.get("api_key")
|
||||
else:
|
||||
ak = request.values.get("api_key")
|
||||
|
||||
|
||||
if (
|
||||
api_keys_db.lookup(ak) is None and (request.headers.get("Origin") != args.require_api_key_origin or (args.require_api_key_origin and request.headers.get("ReqKey") != "1"))
|
||||
api_keys_db.lookup(ak) is None and request.headers.get("Origin") != args.require_api_key_origin
|
||||
):
|
||||
abort(
|
||||
403,
|
||||
|
|
|
@ -428,7 +428,6 @@
|
|||
data.append("api_key", localStorage.getItem("api_key") || "");
|
||||
|
||||
request.open('POST', BaseUrl + '/translate', true);
|
||||
request.setRequestHeader("ReqKey", "1");
|
||||
|
||||
request.onload = function() {
|
||||
try{
|
||||
|
|
Loading…
Reference in a new issue