You can have peanuts when breastfeeding, you may want to avoid them if there is a history of allergies in your family but otherwise your fine to have them
There are NO foods that a mother should avoid simply because she is breastfeeding. It is generally recommended that you eat whatever you like, whenever you like, in the amounts that you like and continue to do this unless you notice an obvious reaction in your baby to a particular food. There is no such thing as a "LIST OF FOODS THAT BREASTFEEDING MOTHERS SHOULD NOT EAT" because most nursing moms can eat anything they want, and because the babies who are sensitive to certain foods are each unique - what bothers one may not bother another. If you have a family history of allergies, you might want to avoid certain foods (for example, peanuts or dairy), but again, this would be different for every child.
From https://kellymom.com/nutrition/mom/mom-foods.html#list