Showing the changes to libraries/script-engine/src/XMLHttpRequestClass.cpp (1 of 1 file). Show all
Unified · Split
| @@ -22,6 +22,8 @@ · 21 unmodified lines | |||
| 22 | #include "XMLHttpRequestClass.h" | 22 | #include "XMLHttpRequestClass.h" |
| 23 | #include "ScriptEngine.h" | 23 | #include "ScriptEngine.h" |
| 24 | 24 | ||
| 25 | const QString METAVERSE_API_URL = "https://metaverse.highfidelity.com/api/"; | ||
| 26 | |||
| 25 | Q_DECLARE_METATYPE(QByteArray*) | 27 | Q_DECLARE_METATYPE(QByteArray*) |
| 26 | 28 | ||
| 27 | XMLHttpRequestClass::XMLHttpRequestClass(QScriptEngine* engine) : | 29 | XMLHttpRequestClass::XMLHttpRequestClass(QScriptEngine* engine) : |
| @@ -207,7 +209,7 @@ void XMLHttpRequestClass::open(const QString& method, const QString& url, bool a · 179 unmodified lines | |||
| 207 | notImplemented(); | 209 | notImplemented(); |
| 208 | } | 210 | } |
| 209 | } else { | 211 | } else { |
| 210 | if (url.toLower().left(39) == "https://metaverse.highfidelity.com/api/") { | 212 | if (url.toLower().left(METAVERSE_API_URL.length()) == METAVERSE_API_URL) { |
| 211 | AccountManager& accountManager = AccountManager::getInstance(); | 213 | AccountManager& accountManager = AccountManager::getInstance(); |
| 212 | 214 | ||
| 213 | if (accountManager.hasValidAccessToken()) { | 215 | if (accountManager.hasValidAccessToken()) { |