'Is the given Origin allowed to make requests to this resource
:param cors_info: the resource\'s CORS related metadata headers
:param origin: the origin making the request
:return: True or False'

def is_origin_allowed(self, cors_info, origin):

    allowed_origins = set()
    if cors_info.get('allow_origin'):
        allowed_origins.update([a.strip() for a in cors_info['allow_origin'].split('    ') if a.strip()])
    if self.app.cors_allow_origin:
        allowed_origins.update(self.app.cors_allow_origin)
    return ((origin in allowed_origins) or ('*' in allowed_origins))
