* feat: isOriginAllowed function * feat: use isOriginAllowed in v2 * refactor: shorten isOriginAllowed