def cross_domain_config(func):
 feature_flag_decorator = patch.dict(settings.FEATURES, {'ENABLE_CORS_HEADERS': True, 'ENABLE_CROSS_DOMAIN_CSRF_COOKIE': True})
 settings_decorator = override_settings(CORS_ORIGIN_WHITELIST=['www.edx.org'], CROSS_DOMAIN_CSRF_COOKIE_NAME='prod-edx-csrftoken', CROSS_DOMAIN_CSRF_COOKIE_DOMAIN='.edx.org')
 is_secure_decorator = patch.object(WSGIRequest, 'is_secure', return_value=True)
 return feature_flag_decorator(settings_decorator(is_secure_decorator(func)))

def cross_domain_config ( func ) : feature_flag_decorator = patch . dict ( settings . FEATURES , { 'ENABLE_CORS_HEADERS' : True , 'ENABLE_CROSS_DOMAIN_CSRF_COOKIE' : True } ) settings_decorator = override_settings ( CORS_ORIGIN_WHITELIST = [ 'www.edx.org' ] , CROSS_DOMAIN_CSRF_COOKIE_NAME = 'prod-edx-csrftoken' , CROSS_DOMAIN_CSRF_COOKIE_DOMAIN = '.edx.org' ) is_secure_decorator = patch . object ( WSGIRequest , 'is_secure' , return_value = True ) return feature_flag_decorator ( settings_decorator ( is_secure_decorator ( func ) ) )
decorator for configuring a cross-domain request .