src/middleware/subdomainrouter.js
Showing 1 of 1 total issue
Function subdomainrouter
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
export default async function subdomainrouter (ctx, next) { ctx.subdomain = 'www'; for (const subdomain of configuration.server.subdomains) { if (ctx.request.host.indexOf(subdomain) === 0) { ctx.state.subdomain = subdomain;
- Read upRead up
- Create a ticketCreate a ticket