Skip to content

Commit dec0ff3

Browse files
author
xialj
committed
bugfix when create a proxy-host.conf can with more ports
1 parent 4ebfb42 commit dec0ff3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

backend/internal/nginx.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,15 @@ const internalNginx = {
234234
host.ipv6 = internalNginx.ipv6Enabled();
235235

236236
let listen_ports = [];
237-
238-
host.domain_names.map(function (domain_name) {
239-
if ( domain_name.indexOf(":") > 0 ){
240-
listen_ports.push(parseInt(domain_name.substring(domain_name.indexOf(":")+1)));
237+
if(nice_host_type === 'proxy_host'){
238+
host.domain_names.map(function (domain_name) {
239+
if ( domain_name.indexOf(":") > 0 ){
240+
listen_ports.push(parseInt(domain_name.substring(domain_name.indexOf(":")+1)));
241+
}
242+
});
243+
if ( listen_ports.length > 0 ){
244+
host.listen_ports = listen_ports;
241245
}
242-
});
243-
if ( listen_ports.length > 0 ){
244-
host.listen_ports = listen_ports;
245246
}
246247

247248
locationsPromise.then(() => {

0 commit comments

Comments
 (0)