Generate a ProxyClass based view that uses the passed base_url.

def generate_proxy(
        prefix, base_url='', verify_ssl=True, middleware=None,
        append_middleware=None, cert=None, timeout=None):
    """Generate a ProxyClass based view that uses the passed base_url."""
    middleware = list(middleware or HttpProxy.proxy_middleware)
    middleware += list(append_middleware or [])

    return type('ProxyClass', (HttpProxy,), {
        'base_url': base_url,
        'reverse_urls': [(prefix, base_url)],
        'verify_ssl': verify_ssl,
        'proxy_middleware': middleware,
        'cert': cert,
        'timeout': timeout
    })