Almost anything you eat or any medicine you take will get to the baby through the breast milk. The question is, is it harmful to the baby or not? Typically spicy foods there might be a little more spice in the breast milk. That may upset the baby’s stomach. You have to think that anything that goes into your body will probably get to the baby through breast milk. That’s a general rule.
Medicines that are over the counter are typically very safe especially if they have a pediatric formulation. Anything that you can see that can be given to kids you can probably take while you’re breast feeding. You should always ask a doctor just to make sure. Most OBGYN’s almost never prescribe things in the postpartum period that will be harmful to a baby in breast milk. So you can trust usually doctors that prescribe you things knowing that you’re breast feeding. Make sure you tell a doctor that you are breast feeding when they’re writing a prescription for you.