mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Avoid sending API key for remote resources
Thanks to Abdo for the report
This commit is contained in:
parent
b02111bb2c
commit
fbb4cf6124
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ class AuthInterceptor(QWebEngineUrlRequestInterceptor):
|
||||||
def interceptRequest(self, info):
|
def interceptRequest(self, info):
|
||||||
from aqt.mediasrv import _APIKEY
|
from aqt.mediasrv import _APIKEY
|
||||||
|
|
||||||
if self._api_enabled:
|
if self._api_enabled and info.requestUrl().host() == "127.0.0.1":
|
||||||
info.setHttpHeader(b"Authorization", f"Bearer {_APIKEY}".encode("utf-8"))
|
info.setHttpHeader(b"Authorization", f"Bearer {_APIKEY}".encode("utf-8"))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue