Sub host options #65
@@ -52,7 +52,7 @@ function maybe_bounce(req, res, sock, head, opt) {
|
|||||||
if (subdomain && opt.subHost) {
|
if (subdomain && opt.subHost) {
|
||||||
const subHosts = Array.isArray(opt.subHost)
|
const subHosts = Array.isArray(opt.subHost)
|
||||||
? opt.subHost : [opt.subHost]
|
? opt.subHost : [opt.subHost]
|
||||||
const subHost = opt.subHost.reduce((found, sub) => {
|
const subHost = subHosts.reduce((found, sub) => {
|
||||||
return found
|
return found
|
||||||
|| (subdomain.slice(-sub.length) == sub ? sub : '')
|
|| (subdomain.slice(-sub.length) == sub ? sub : '')
|
||||||
}, '')
|
}, '')
|
||||||
|
|||||||
Reference in New Issue
Block a user