Create a new middleware function to hand off request to handle when the incoming host for the request matches hostname. The function is called as handle(req, res, next), like a standard middleware. hostname can be a string or a RegExp object. When hostname is a string it can contain * to match 1 or more characters in that section of the hostname. When hostname is a RegExp, it will be forced to case-insensitive (since hostnames are) and will be forced to match based on the start and end of the hostname.