mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-21 08:27:38 +00:00
add PROXY to stream hosts.
This commit is contained in:
@@ -18,13 +18,23 @@ module.exports = Mn.View.extend({
|
||||
buttons: '.modal-footer button',
|
||||
switches: '.custom-switch-input',
|
||||
cancel: 'button.cancel',
|
||||
save: 'button.save'
|
||||
save: 'button.save',
|
||||
stream_allow_proxy_protocol: 'input[name="stream_allow_proxy_protocol"]',
|
||||
stream_enable_proxy_protocol: 'input[name="stream_enable_proxy_protocol"]',
|
||||
stream_load_balancer_ip: 'input[name="stream_load_balancer_ip"]'
|
||||
},
|
||||
|
||||
events: {
|
||||
'change @ui.switches': function () {
|
||||
this.ui.type_error.hide();
|
||||
},
|
||||
'change @ui.stream_allow_proxy_protocol': function () {
|
||||
let checked = this.ui.stream_allow_proxy_protocol.prop('checked');
|
||||
this.ui.stream_load_balancer_ip
|
||||
.prop('disabled', !checked)
|
||||
.parents('.form-group')
|
||||
.css('opacity', checked ? 1 : 0.5);
|
||||
},
|
||||
|
||||
'click @ui.save': function (e) {
|
||||
e.preventDefault();
|
||||
@@ -47,6 +57,8 @@ module.exports = Mn.View.extend({
|
||||
data.forwarding_port = parseInt(data.forwarding_port, 10);
|
||||
data.tcp_forwarding = !!data.tcp_forwarding;
|
||||
data.udp_forwarding = !!data.udp_forwarding;
|
||||
data.stream_enable_proxy_protocol = !!data.stream_enable_proxy_protocol;
|
||||
data.stream_allow_proxy_protocol = !!data.stream_allow_proxy_protocol;
|
||||
|
||||
let method = App.Api.Nginx.Streams.create;
|
||||
let is_new = true;
|
||||
@@ -82,3 +94,4 @@ module.exports = Mn.View.extend({
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user