Invoke sessionHostname generator (if provided) *inside* middelware handler