sanic_cors/core.py
def get_app_kwarg_dict(appInstance):
    """Returns the dictionary of CORS specific app configurations."""
    # In order to support blueprints which do not have a config attribute
    app_config = getattr(appInstance, 'config', {})
    return dict(
        (k.lower().replace('cors_', ''), app_config.get(k))
        for k in CONFIG_OPTIONS
        if app_config.get(k) is not None
    )
def get_app_kwarg_dict(appInstance):
    # In order to support blueprints which do not have a config attribute
    app_config = getattr(appInstance, 'config', {})
    return dict(
        (k.lower().replace('cors_', ''), app_config.get(k))
        for k in CONFIG_OPTIONS
        if app_config.get(k) is not None
    )
def get_app_kwarg_dict ( appInstance ) : # In order to support blueprints which do not have a config attribute app_config = getattr ( appInstance , 'config' , { } ) return dict ( ( k . lower ( ) . replace ( 'cors_' , '' ) , app_config . get ( k ) ) for k in CONFIG_OPTIONS if app_config . get ( k ) is not None )
Returns the dictionary of CORS specific app configurations.
Returns the dictionary of CORS specific app configurations .