@ -838,6 +838,18 @@
< / legend >
< / legend >
< textarea id = "webUICustomHTTPHeadersTextarea" placeholder = "QBT_TR(Header: value pairs, one per line)QBT_TR[CONTEXT=OptionsDialog]" style = "width: 90%;" > < / textarea >
< textarea id = "webUICustomHTTPHeadersTextarea" placeholder = "QBT_TR(Header: value pairs, one per line)QBT_TR[CONTEXT=OptionsDialog]" style = "width: 90%;" > < / textarea >
< / fieldset >
< / fieldset >
< fieldset class = "settings" >
< legend >
< input type = "checkbox" id = "webUIReverseProxySupportCheckbox" onclick = "qBittorrent.Preferences.updateWebUIReverseProxySettings();" / >
< label for = "webUIReverseProxySupportCheckbox" > QBT_TR(Enable reverse proxy support)QBT_TR[CONTEXT=OptionsDialog]< / label >
< / legend >
< div class = "formRow" >
< input type = "text" id = "webUIReverseProxiesListTextarea" / >
< label for = "webUIReverseProxiesListTextarea" class = "leftLabelLarge" > QBT_TR(Trusted proxies list:)QBT_TR[CONTEXT=OptionsDialog]< / label >
< / div >
< / fieldset >
< / fieldset >
< / fieldset >
< fieldset class = "settings" >
< fieldset class = "settings" >
@ -1279,6 +1291,7 @@
updateAlternativeWebUISettings: updateAlternativeWebUISettings,
updateAlternativeWebUISettings: updateAlternativeWebUISettings,
updateHostHeaderValidationSettings: updateHostHeaderValidationSettings,
updateHostHeaderValidationSettings: updateHostHeaderValidationSettings,
updateWebUICustomHTTPHeadersSettings: updateWebUICustomHTTPHeadersSettings,
updateWebUICustomHTTPHeadersSettings: updateWebUICustomHTTPHeadersSettings,
updateWebUIReverseProxySettings: updateWebUIReverseProxySettings,
updateDynDnsSettings: updateDynDnsSettings,
updateDynDnsSettings: updateDynDnsSettings,
registerDynDns: registerDynDns,
registerDynDns: registerDynDns,
applyPreferences: applyPreferences
applyPreferences: applyPreferences
@ -1511,6 +1524,11 @@
$('webUICustomHTTPHeadersTextarea').setProperty('disabled', !isEnabled);
$('webUICustomHTTPHeadersTextarea').setProperty('disabled', !isEnabled);
};
};
const updateWebUIReverseProxySettings = function() {
const isEnabled = $('webUIReverseProxySupportCheckbox').getProperty('checked');
$('webUIReverseProxiesListTextarea').setProperty('disabled', !isEnabled);
};
const updateDynDnsSettings = function() {
const updateDynDnsSettings = function() {
const isDynDnsEnabled = $('use_dyndns_checkbox').getProperty('checked');
const isDynDnsEnabled = $('use_dyndns_checkbox').getProperty('checked');
$('dyndns_select').setProperty('disabled', !isDynDnsEnabled);
$('dyndns_select').setProperty('disabled', !isDynDnsEnabled);
@ -1886,6 +1904,11 @@
$('webUICustomHTTPHeadersTextarea').setProperty('value', pref.web_ui_custom_http_headers);
$('webUICustomHTTPHeadersTextarea').setProperty('value', pref.web_ui_custom_http_headers);
updateWebUICustomHTTPHeadersSettings();
updateWebUICustomHTTPHeadersSettings();
// Reverse Proxy
$('webUIReverseProxySupportCheckbox').setProperty('checked', pref.web_ui_reverse_proxy_support_enabled);
$('webUIReverseProxiesListTextarea').setProperty('value', pref.web_ui_trusted_reverse_proxies_list);
updateWebUIReverseProxySettings();
// Update my dynamic domain name
// Update my dynamic domain name
$('use_dyndns_checkbox').setProperty('checked', pref.dyndns_enabled);
$('use_dyndns_checkbox').setProperty('checked', pref.dyndns_enabled);
$('dyndns_select').setProperty('value', pref.dyndns_service);
$('dyndns_select').setProperty('value', pref.dyndns_service);
@ -2277,6 +2300,10 @@
settings.set('web_ui_use_custom_http_headers_enabled', $('webUIUseCustomHTTPHeadersCheckbox').getProperty('checked'));
settings.set('web_ui_use_custom_http_headers_enabled', $('webUIUseCustomHTTPHeadersCheckbox').getProperty('checked'));
settings.set('web_ui_custom_http_headers', $('webUICustomHTTPHeadersTextarea').getProperty('value'));
settings.set('web_ui_custom_http_headers', $('webUICustomHTTPHeadersTextarea').getProperty('value'));
// Reverse Proxy
settings.set('web_ui_reverse_proxy_support_enabled', $('webUIReverseProxySupportCheckbox').getProperty('checked'));
settings.set('web_ui_trusted_reverse_proxies_list', $('webUIReverseProxiesListTextarea').getProperty('value'));
// Update my dynamic domain name
// Update my dynamic domain name
settings.set('dyndns_enabled', $('use_dyndns_checkbox').getProperty('checked'));
settings.set('dyndns_enabled', $('use_dyndns_checkbox').getProperty('checked'));
settings.set('dyndns_service', $('dyndns_select').getProperty('value'));
settings.set('dyndns_service', $('dyndns_select').getProperty('value'));