mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
Add option to control CSRF protection
Some users are using WebUI with simple port-forwarding from their router, providing an option to control the protection will save them from setting up an non-trival web proxy. Closes #7274.
This commit is contained in:
@@ -586,6 +586,16 @@ void Preferences::setWebUiClickjackingProtectionEnabled(bool enabled)
|
||||
setValue("Preferences/WebUI/ClickjackingProtection", enabled);
|
||||
}
|
||||
|
||||
bool Preferences::isWebUiCSRFProtectionEnabled() const
|
||||
{
|
||||
return value("Preferences/WebUI/CSRFProtection", true).toBool();
|
||||
}
|
||||
|
||||
void Preferences::setWebUiCSRFProtectionEnabled(bool enabled)
|
||||
{
|
||||
setValue("Preferences/WebUI/CSRFProtection", enabled);
|
||||
}
|
||||
|
||||
bool Preferences::isWebUiHttpsEnabled() const
|
||||
{
|
||||
return value("Preferences/WebUI/HTTPS/Enabled", false).toBool();
|
||||
|
||||
Reference in New Issue
Block a user