GBS Positive

Are babies born by C-section completely safe from GBS or can they still get it?

My guess is they would have to go through the birth canal to get it but I’m not sure if that is true.