Produce a matching middleware that accepts request which subdomain is consistent with the expectation.
If the expected subdomain is 'api', then 'api.example.com' and '*.api.example.com' will be accepted.
The joker '*' can be used to fuzzy-match a label.
expected_subdomain |
expected subdomain pattern |
forward |
invoked if the subdomain matches |
strict |
strictly match the subdomains to have the exactly same amount of labels |
skip |