Understand that the foal is moving. Her hormones are changing. Her balance is off and she hurts. Do not let her put her mouth on you, but understand this is not the time to get into a battle with her. Ask yourself what may trigger the nip. Are you in her space? She will want to be alone as she gets closer to her date. Are you grooming her to hard? Her skin is sensitive now. And be careful when she foals, my normally sweet mares would bite hard right after they foaled. If you are going to imprint be sure someone holds the mare.