Pregnant bridesmaid

My cousin asked me to be in her wedding which is in April 2017 but I am pregnant and will be due may 2017. The wedding is 3 weeks before my due date. I am afraid of ruining her wedding if I go in to labor and I'm also afraid of having my baby in a different state at a different hospital from the one I work at in my state. I don't want to miss her wedding or make her have to pick another bridesmaid. What do I do ladies? Is it even save to drive 8 hours while being about 37 weeks pregnant?