Simple pattern matching helper for allowing/blocking certain domains to support dynamic CORS validation in a NodeJS application