Can I have mayonnaise?

I’ve heard you can’t have mayo when pregnant. But I am pretty positive I ate it when pregnant with my first.