mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 05:31:25 -07:00
Add option to control WebUI clickjacking protection
Some users actually want embedding WebUI into their custom build iframe. Closes #7370.
This commit is contained in:
parent
e8a69dd60c
commit
bad4d94f77
8 changed files with 52 additions and 3 deletions
|
@ -205,6 +205,8 @@ void AppController::preferencesAction()
|
|||
for (const Utils::Net::Subnet &subnet : copyAsConst(pref->getWebUiAuthSubnetWhitelist()))
|
||||
authSubnetWhitelistStringList << Utils::Net::subnetToString(subnet);
|
||||
data["bypass_auth_subnet_whitelist"] = authSubnetWhitelistStringList.join("\n");
|
||||
// Security
|
||||
data["web_ui_clickjacking_protection_enabled"] = pref->isWebUiClickjackingProtectionEnabled();
|
||||
// Update my dynamic domain name
|
||||
data["dyndns_enabled"] = pref->isDynDNSEnabled();
|
||||
data["dyndns_service"] = pref->getDynDNSService();
|
||||
|
@ -479,6 +481,9 @@ void AppController::setPreferencesAction()
|
|||
// recognize new lines and commas as delimiters
|
||||
pref->setWebUiAuthSubnetWhitelist(m["bypass_auth_subnet_whitelist"].toString().split(QRegularExpression("\n|,"), QString::SkipEmptyParts));
|
||||
}
|
||||
// Security
|
||||
if (m.contains("web_ui_clickjacking_protection_enabled"))
|
||||
pref->setWebUiClickjackingProtectionEnabled(m["web_ui_clickjacking_protection_enabled"].toBool());
|
||||
// Update my dynamic domain name
|
||||
if (m.contains("dyndns_enabled"))
|
||||
pref->setDynDNSEnabled(m["dyndns_enabled"].toBool());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue