mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
Use a random number for WebUI cache busting
Also fetch qbt version info via WebAPI properly.
This commit is contained in:
parent
d022457e0c
commit
49b57904f9
18 changed files with 70 additions and 45 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue