diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-08-02 18:58:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-02 18:58:19 -0400 |
commit | bdcdf9b1f5430760be605a7a5e84440e324de7b5 (patch) | |
tree | 467b9284ce27eaaee5ac27d8c28b95ed32dea775 /ext/bg/js/backend.js | |
parent | a37ca1d378ae0bf3e78d1e2858d3dd6f6982c061 (diff) |
Strip request origin (#710)
* Add web request permissions
* Create fetch wrapper that anonymizes the request
* Fix Firefox not supporting 'extraHeaders' option
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r-- | ext/bg/js/backend.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 9e7ac76a..85b9b5e6 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -28,6 +28,7 @@ * Mecab * ObjectPropertyAccessor * OptionsUtil + * RequestBuilder * TemplateRenderer * Translator * conditionsTestValue @@ -49,9 +50,13 @@ class Backend { this._options = null; this._optionsSchema = null; this._defaultAnkiFieldTemplates = null; - this._audioUriBuilder = new AudioUriBuilder(); + this._requestBuilder = new RequestBuilder(); + this._audioUriBuilder = new AudioUriBuilder({ + requestBuilder: this._requestBuilder + }); this._audioSystem = new AudioSystem({ audioUriBuilder: this._audioUriBuilder, + requestBuilder: this._requestBuilder, useCache: false }); this._ankiNoteBuilder = new AnkiNoteBuilder({ |