fix bug with regexp and update cors docs