added regex option for allowed origins