mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-05 17:03:33 +00:00
WIP: started adding new host type ssl passthrough
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
const _ = require('lodash');
|
||||
const proxyHostModel = require('../models/proxy_host');
|
||||
const redirectionHostModel = require('../models/redirection_host');
|
||||
const deadHostModel = require('../models/dead_host');
|
||||
const _ = require('lodash');
|
||||
const proxyHostModel = require('../models/proxy_host');
|
||||
const redirectionHostModel = require('../models/redirection_host');
|
||||
const deadHostModel = require('../models/dead_host');
|
||||
const sslPassthroughHostModel = require('../models/ssl_passthrough_host');
|
||||
|
||||
const internalHost = {
|
||||
|
||||
@@ -81,6 +82,9 @@ const internalHost = {
|
||||
.query()
|
||||
.where('is_deleted', 0),
|
||||
deadHostModel
|
||||
.query()
|
||||
.where('is_deleted', 0),
|
||||
sslPassthroughHostModel
|
||||
.query()
|
||||
.where('is_deleted', 0)
|
||||
];
|
||||
@@ -112,6 +116,12 @@ const internalHost = {
|
||||
response_object.total_count += response_object.dead_hosts.length;
|
||||
}
|
||||
|
||||
if (promises_results[3]) {
|
||||
// SSL Passthrough Hosts
|
||||
response_object.ssl_passthrough_hosts = internalHost._getHostsWithDomains(promises_results[3], domain_names);
|
||||
response_object.total_count += response_object.ssl_passthrough_hosts.length;
|
||||
}
|
||||
|
||||
return response_object;
|
||||
});
|
||||
},
|
||||
@@ -137,7 +147,11 @@ const internalHost = {
|
||||
deadHostModel
|
||||
.query()
|
||||
.where('is_deleted', 0)
|
||||
.andWhere('domain_names', 'like', '%' + hostname + '%')
|
||||
.andWhere('domain_names', 'like', '%' + hostname + '%'),
|
||||
sslPassthroughHostModel
|
||||
.query()
|
||||
.where('is_deleted', 0)
|
||||
.andWhere('domain_name', '=', hostname),
|
||||
];
|
||||
|
||||
return Promise.all(promises)
|
||||
@@ -165,6 +179,13 @@ const internalHost = {
|
||||
}
|
||||
}
|
||||
|
||||
if (promises_results[3]) {
|
||||
// SSL Passthrough Hosts
|
||||
if (internalHost._checkHostnameRecordsTaken(hostname, promises_results[3], ignore_type === 'ssl_passthrough' && ignore_id ? ignore_id : 0)) {
|
||||
is_taken = true;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
hostname: hostname,
|
||||
is_taken: is_taken
|
||||
|
Reference in New Issue
Block a user