mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-14 16:34:27 +00:00
bugfix when create a proxy-host.conf can with more ports
This commit is contained in:
parent
75c2f73796
commit
4ebfb4247c
@ -32,17 +32,7 @@ const internalNginx = {
|
|||||||
// Delete the .err file too
|
// Delete the .err file too
|
||||||
return internalNginx.deleteConfig(host_type, host, false, true);
|
return internalNginx.deleteConfig(host_type, host, false, true);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
boolean use_default_port = false;
|
|
||||||
let listen_ports = [];
|
|
||||||
_.each(host.domain_names, (domain_name) => {
|
|
||||||
if ( domain_name.indexOf(":") < 0 ){
|
|
||||||
host.use_default_port = true;
|
|
||||||
}else{
|
|
||||||
let listen_port = parseInt(domain_name.substring(domain_name.indexOf(":")+1));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return internalNginx.generateConfig(host_type, host);
|
return internalNginx.generateConfig(host_type, host);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -242,6 +232,17 @@ const internalNginx = {
|
|||||||
|
|
||||||
// Set the IPv6 setting for the host
|
// Set the IPv6 setting for the host
|
||||||
host.ipv6 = internalNginx.ipv6Enabled();
|
host.ipv6 = internalNginx.ipv6Enabled();
|
||||||
|
|
||||||
|
let listen_ports = [];
|
||||||
|
|
||||||
|
host.domain_names.map(function (domain_name) {
|
||||||
|
if ( domain_name.indexOf(":") > 0 ){
|
||||||
|
listen_ports.push(parseInt(domain_name.substring(domain_name.indexOf(":")+1)));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if ( listen_ports.length > 0 ){
|
||||||
|
host.listen_ports = listen_ports;
|
||||||
|
}
|
||||||
|
|
||||||
locationsPromise.then(() => {
|
locationsPromise.then(() => {
|
||||||
renderEngine
|
renderEngine
|
||||||
@ -255,7 +256,6 @@ const internalNginx = {
|
|||||||
|
|
||||||
// Restore locations array
|
// Restore locations array
|
||||||
host.locations = origLocations;
|
host.locations = origLocations;
|
||||||
|
|
||||||
resolve(true);
|
resolve(true);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user