mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 17:31:00 +00:00
Encode secret
This commit is contained in:
parent
c827d442ec
commit
8ba054c786
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ document.addEventListener('DOMContentLoaded', function(){
|
||||||
filesTranslation: true,
|
filesTranslation: true,
|
||||||
frontendTimeout: 500,
|
frontendTimeout: 500,
|
||||||
|
|
||||||
apiSecret: atob("{{ api_secret }}")
|
apiSecret: "{{ api_secret }}"
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
@ -244,7 +244,7 @@ document.addEventListener('DOMContentLoaded', function(){
|
||||||
data.append("format", self.isHtml ? "html" : "text");
|
data.append("format", self.isHtml ? "html" : "text");
|
||||||
data.append("alternatives", 3);
|
data.append("alternatives", 3);
|
||||||
data.append("api_key", localStorage.getItem("api_key") || "");
|
data.append("api_key", localStorage.getItem("api_key") || "");
|
||||||
if (self.apiSecret) data.append("secret", self.apiSecret);
|
if (self.apiSecret) data.append("secret", atob(self.apiSecret));
|
||||||
|
|
||||||
request.open('POST', BaseUrl + '/translate', true);
|
request.open('POST', BaseUrl + '/translate', true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue