<s> """<STR_LIT>""" <EOL> from functools import update_wrapper <EOL> from flask import make_response , request , current_app <EOL> from . core import * <EOL> def cross_origin ( * args , ** kwargs ) : <EOL> '''<STR_LIT>''' <EOL> _options = kwargs <EOL> def decorator ( f ) : <EOL> debugLog ( "<STR_LIT>" , f , _options ) <EOL> if _options . get ( '<STR_LIT>' , True ) : <EOL> f . required_methods = getattr ( f , '<STR_LIT>' , set ( ) ) <EOL> f . required_methods . add ( '<STR_LIT>' ) <EOL> f . provide_automatic_options = False <EOL> def wrapped_function ( * args , ** kwargs ) : <EOL> options = get_cors_options ( current_app , _options ) <EOL> if options . get ( '<STR_LIT>' ) and request . method == '<STR_LIT>' : <EOL> resp = current_app . make_default_options_response ( ) <EOL> else : <EOL> resp = make_response ( f ( * args , ** kwargs ) ) <EOL> set_cors_headers ( resp , options ) <EOL> setattr ( resp , FLASK_CORS_EVALUATED , True ) <EOL> return resp <EOL> return update_wrapper ( wrapped_function , f ) <EOL> return decorator </s>
