add patterns and cors