def allow_CORS_GET(func):
 @wraps(func)
 def _added_header(request, *args, **kwargs):
  response = func(request, *args, **kwargs)
  if (('GET' == request.method) and switch_is_active('application_ACAO')):
   response['Access-Control-Allow-Origin'] = '*'
  return response
 return _added_header

def allow_CORS_GET ( func ) : @ wraps ( func ) def _added_header ( request , * args , ** kwargs ) : response = func ( request , * args , ** kwargs ) if ( ( 'GET' == request . method ) and switch_is_active ( 'application_ACAO' ) ) : response [ 'Access-Control-Allow-Origin' ] = '*' return response return _added_header
decorator to allow cors for get requests .