Sub host options #65

Closed
wclr wants to merge 3 commits from sub-host into master
Showing only changes of commit 6fc1fa0bf6 - Show all commits
+2 -2
View File
@@ -51,8 +51,8 @@ function maybe_bounce(req, res, sock, head, opt) {
if (subdomain && opt.subHost) {
const subHosts = Array.isArray(opt.subHost)
? opt.subHost : [opt.subHost]
const subHost = opt.subHost.reduce((found, sub) => {
? opt.subHost : [opt.subHost]
const subHost = subHosts.reduce((found, sub) => {
return found
|| (subdomain.slice(-sub.length) == sub ? sub : '')
}, '')