mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-10 06:12:53 +02:00
Update further links.
This commit is contained in:
parent
629b3c084c
commit
ad2c3f08e6
3 changed files with 12 additions and 7 deletions
|
@ -30,9 +30,14 @@ namespace NetworkingConstants {
|
|||
|
||||
// Web Engine requests to this parent domain have an account authorization header added
|
||||
const QString AUTH_HOSTNAME_BASE = "highfidelity.com";
|
||||
const QStringList IS_AUTHABLE_HOSTNAME = { "highfidelity.com", "highfidelity.io" };
|
||||
|
||||
// Use a custom User-Agent to avoid ModSecurity filtering, e.g. by hosting providers.
|
||||
const QByteArray VIRCADIA_USER_AGENT = "Mozilla/5.0 (VircadiaInterface)";
|
||||
|
||||
const QString WEB_ENGINE_USER_AGENT = "Chrome/48.0 (VircadiaInterface)";
|
||||
const QString METAVERSE_USER_AGENT = "Chrome/48.0 (VircadiaInterface)";
|
||||
const QString MOBILE_USER_AGENT = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36";
|
||||
|
||||
const QUrl BUILDS_XML_URL("https://highfidelity.com/builds.xml");
|
||||
const QUrl MASTER_BUILDS_XML_URL("https://highfidelity.com/dev-builds.xml");
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <QtQml/QQmlContext>
|
||||
|
||||
#include "RequestFilters.h"
|
||||
#include "NetworkingConstants.h"
|
||||
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
static const QString QML_WEB_ENGINE_STORAGE_NAME = "qmlWebEngine";
|
||||
|
@ -26,8 +27,7 @@ static std::mutex FileTypeProfile_mutex;
|
|||
FileTypeProfile::FileTypeProfile(QQmlContext* parent) :
|
||||
ContextAwareProfile(parent)
|
||||
{
|
||||
static const QString WEB_ENGINE_USER_AGENT = "Chrome/48.0 (HighFidelityInterface)";
|
||||
setHttpUserAgent(WEB_ENGINE_USER_AGENT);
|
||||
setHttpUserAgent(NetworkingConstants::WEB_ENGINE_USER_AGENT);
|
||||
|
||||
setStorageName(QML_WEB_ENGINE_STORAGE_NAME);
|
||||
setOffTheRecord(false);
|
||||
|
|
|
@ -27,10 +27,10 @@ namespace {
|
|||
|
||||
bool isAuthableHighFidelityURL(const QUrl& url) {
|
||||
auto metaverseServerURL = MetaverseAPI::getCurrentMetaverseServerURL();
|
||||
static const QStringList HF_HOSTS = {
|
||||
"highfidelity.com", "highfidelity.io",
|
||||
metaverseServerURL.toString(),
|
||||
static QStringList HF_HOSTS = {
|
||||
metaverseServerURL.toString()
|
||||
};
|
||||
HF_HOSTS << NetworkingConstants::IS_AUTHABLE_HOSTNAME;
|
||||
const auto& scheme = url.scheme();
|
||||
const auto& host = url.host();
|
||||
|
||||
|
@ -83,8 +83,8 @@ void RequestFilters::interceptHFWebEngineRequest(QWebEngineUrlRequestInfo& info,
|
|||
}
|
||||
}
|
||||
static const QString USER_AGENT = "User-Agent";
|
||||
const QString tokenStringMobile{ "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36" };
|
||||
const QString tokenStringMetaverse{ "Chrome/48.0 (HighFidelityInterface)" };
|
||||
const QString tokenStringMobile{ NetworkingConstants::MOBILE_USER_AGENT };
|
||||
const QString tokenStringMetaverse{ NetworkingConstants::METAVERSE_USER_AGENT };
|
||||
const QString tokenStringLimitedCommerce{ "Chrome/48.0 (HighFidelityInterface limitedCommerce)" };
|
||||
|
||||
const QString tokenString = !isAuthable ? tokenStringMobile : (accountManager->getLimitedCommerce() ? tokenStringLimitedCommerce : tokenStringMetaverse);
|
||||
|
|
Loading…
Reference in a new issue