mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-18 10:06:26 +00:00
404 hosts section and other fixes
This commit is contained in:
@ -11,8 +11,8 @@ require('jquery-mask-plugin');
|
||||
require('selectize');
|
||||
|
||||
module.exports = Mn.View.extend({
|
||||
template: template,
|
||||
className: 'modal-dialog',
|
||||
template: template,
|
||||
className: 'modal-dialog',
|
||||
max_file_size: 5120,
|
||||
|
||||
ui: {
|
||||
@ -60,19 +60,15 @@ module.exports = Mn.View.extend({
|
||||
let data = this.ui.form.serializeJSON();
|
||||
|
||||
// Manipulate
|
||||
data.forward_port = parseInt(data.forward_port, 10);
|
||||
_.map(data, function (item, idx) {
|
||||
if (typeof item === 'string' && item === '1') {
|
||||
item = true;
|
||||
} else if (typeof item === 'object' && item !== null) {
|
||||
_.map(item, function (item2, idx2) {
|
||||
if (typeof item2 === 'string' && item2 === '1') {
|
||||
item[idx2] = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
data[idx] = item;
|
||||
});
|
||||
data.forward_port = parseInt(data.forward_port, 10);
|
||||
data.block_exploits = !!data.block_exploits;
|
||||
data.caching_enabled = !!data.caching_enabled;
|
||||
data.ssl_enabled = !!data.ssl_enabled;
|
||||
data.ssl_forced = !!data.ssl_forced;
|
||||
|
||||
if (typeof data.meta !== 'undefined' && typeof data.meta.letsencrypt_agree !== 'undefined') {
|
||||
data.meta.letsencrypt_agree = !!data.meta.letsencrypt_agree;
|
||||
}
|
||||
|
||||
if (typeof data.domain_names === 'string' && data.domain_names) {
|
||||
data.domain_names = data.domain_names.split(',');
|
||||
|
Reference in New Issue
Block a user