Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let dispatch = async (ctx, next) => {
if (!isIP.test(ctx.hostname) && wildcard(wc, ctx.hostname)) {
ctx.subdomain = tld.getSubdomain(ctx.hostname);
await middleware(ctx, next);
} else {
await next();
}
}
dispatch.subdomain = wc;