Middleware to map the kernels depending on the subdomain