From 629b3c084c25982827b22d59e9b522be6c4f5638 Mon Sep 17 00:00:00 2001 From: Kasen IO Date: Fri, 10 Jul 2020 00:08:46 -0400 Subject: [PATCH] Update user agent to use "Vircadia" + update getUserAgent function to use the same. --- interface/src/Application.cpp | 2 +- libraries/networking/src/NetworkingConstants.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 3562fcee9f..2aff9a2aef 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2614,7 +2614,7 @@ QString Application::getUserAgent() { return userAgent; } - QString userAgent = "Mozilla/5.0 (HighFidelityInterface/" + BuildInfo::VERSION + "; " + QString userAgent = NetworkingConstants::VIRCADIA_USER_AGENT + "/" + BuildInfo::VERSION + "; " + QSysInfo::productType() + " " + QSysInfo::productVersion() + ")"; auto formatPluginName = [](QString name) -> QString { return name.trimmed().replace(" ", "-"); }; diff --git a/libraries/networking/src/NetworkingConstants.h b/libraries/networking/src/NetworkingConstants.h index b903dbc7c0..5805b9c30a 100644 --- a/libraries/networking/src/NetworkingConstants.h +++ b/libraries/networking/src/NetworkingConstants.h @@ -32,7 +32,7 @@ namespace NetworkingConstants { const QString AUTH_HOSTNAME_BASE = "highfidelity.com"; // Use a custom User-Agent to avoid ModSecurity filtering, e.g. by hosting providers. - const QByteArray VIRCADIA_USER_AGENT = "Mozilla/5.0 (HighFidelityInterface)"; + const QByteArray VIRCADIA_USER_AGENT = "Mozilla/5.0 (VircadiaInterface)"; const QUrl BUILDS_XML_URL("https://highfidelity.com/builds.xml"); const QUrl MASTER_BUILDS_XML_URL("https://highfidelity.com/dev-builds.xml");