def url_for(*a, **kw):
    try:
        kw['_external'] = True
        if get_config('PREFERRED_URL_SCHEME'):
            kw['_scheme'] = get_config('PREFERRED_URL_SCHEME')
        return flask_url_for(*a, **kw)
    except RuntimeError:
        return None
Generate external URLs with HTTPS (if configured).
dataset/ETHPy150Open pudo/aleph/aleph/core.py/url_for