def METHOD_NAME(resp):
    # If CORS headers are set in a view decorator, pass
    if resp.headers is not None and resp.headers.get(ACL_ORIGIN):
        LOG.debug('CORS have been already evaluated, skipping')
        return resp
    normalized_path = unquote_plus(request.path)
    for res_regex, res_options in resources:
        if try_match(normalized_path, res_regex):
            LOG.debug("Request to '%s' matches CORS resource '%s'. Using options: %s",
                      request.path, get_regexp_pattern(res_regex), res_options)
            set_cors_headers(resp, res_options)
            break
    else:
        LOG.debug('No CORS rule matches')
    return resp