def find_config(self, path, key, default=None):
        """Return the most-specific value for key along path, or default."""
        trail = path or '/'
        while trail:
            nodeconf = self.config.get(trail, {})

            if key in nodeconf:
                return nodeconf[key]

            lastslash = trail.rfind('/')
            if lastslash == -1:
                break
            elif lastslash == 0 and trail != '/':
                trail = '/'
            else:
                trail = trail[:lastslash]

        return default
Return the most-specific value for key along path, or default.
cherrypy/_cptree.py