mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:43:53 +02:00
Merge pull request #4450 from birarda/master
some & squishes missed in review, metaverse user-agent fix
This commit is contained in:
commit
d6bf0f3bec
3 changed files with 4 additions and 6 deletions
|
@ -47,6 +47,6 @@ bool DataWebPage::acceptNavigationRequest(QWebFrame* frame, const QNetworkReques
|
|||
}
|
||||
}
|
||||
|
||||
QString DataWebPage::userAgentForUrl(const QUrl & url) const {
|
||||
return INTERFACE_USER_AGENT;
|
||||
QString DataWebPage::userAgentForUrl(const QUrl& url) const {
|
||||
return HIGH_FIDELITY_USER_AGENT;
|
||||
}
|
||||
|
|
|
@ -14,15 +14,13 @@
|
|||
|
||||
#include <qwebpage.h>
|
||||
|
||||
const QString INTERFACE_USER_AGENT = "HighFidelityInterface/1.0";
|
||||
|
||||
class DataWebPage : public QWebPage {
|
||||
public:
|
||||
DataWebPage(QObject* parent = 0);
|
||||
protected:
|
||||
void javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID);
|
||||
bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType type);
|
||||
virtual QString userAgentForUrl(const QUrl & url) const;
|
||||
virtual QString userAgentForUrl(const QUrl& url) const;
|
||||
};
|
||||
|
||||
#endif // hifi_DataWebPage_h
|
||||
|
|
|
@ -68,7 +68,7 @@ static const quint64 USECS_PER_SECOND = USECS_PER_MSEC * MSECS_PER_SECOND;
|
|||
const int BITS_IN_BYTE = 8;
|
||||
|
||||
// Use a custom User-Agent to avoid ModSecurity filtering, e.g. by hosting providers.
|
||||
const QByteArray HIGH_FIDELITY_USER_AGENT = "Mozilla/5.0 (HighFidelity)";
|
||||
const QByteArray HIGH_FIDELITY_USER_AGENT = "Mozilla/5.0 (HighFidelityInterface)";
|
||||
|
||||
quint64 usecTimestampNow(bool wantDebug = false);
|
||||
void usecTimestampNowForceClockSkew(int clockSkew);
|
||||
|
|
Loading…
Reference in a new issue