mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
check for HTTPS scheme in bearer add in XMLHttpRequest
This commit is contained in:
parent
a45677c2a2
commit
81cb33574d
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ void XMLHttpRequestClass::open(const QString& method, const QString& url, bool a
|
|||
if (url.toLower().left(METAVERSE_API_URL.length()) == METAVERSE_API_URL) {
|
||||
auto accountManager = DependencyManager::get<AccountManager>();
|
||||
|
||||
if (accountManager->hasValidAccessToken()) {
|
||||
if (_url.scheme() == "https" && accountManager->hasValidAccessToken()) {
|
||||
static const QString HTTP_AUTHORIZATION_HEADER = "Authorization";
|
||||
QString bearerString = "Bearer " + accountManager->getAccountInfo().getAccessToken().token;
|
||||
_request.setRawHeader(HTTP_AUTHORIZATION_HEADER.toLocal8Bit(), bearerString.toLocal8Bit());
|
||||
|
|
Loading…
Reference in a new issue