Use a random number for WebUI cache busting

Also fetch qbt version info via WebAPI properly.
This commit is contained in:
Chocobo1 2019-04-17 20:09:03 +08:00
parent d022457e0c
commit 49b57904f9
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
18 changed files with 70 additions and 45 deletions

View file

@ -117,6 +117,7 @@ namespace
WebApplication::WebApplication(QObject *parent)
: QObject(parent)
, m_cacheID {QString::number(Utils::Random::rand(), 36)}
{
registerAPIController(QLatin1String("app"), new AppController(this, this));
registerAPIController(QLatin1String("auth"), new AuthController(this, this));
@ -225,7 +226,7 @@ void WebApplication::translateDocument(QString &data)
}
data.replace(QLatin1String("${LANG}"), m_currentLocale.left(2));
data.replace(QLatin1String("${VERSION}"), QBT_VERSION);
data.replace(QLatin1String("${CACHEID}"), m_cacheID);
}
}