Cold sore and medication during pregnancy?

I got my first cold sore ever in my 1st trimester. I told my OB and he said he’d give me antiviral meds when I’m 35 weeks. Has anyone else tooken antiviral at 35 weeks preggo due to a cold sore during pregnancy? Is it just a short dosage or do I take them until have baby? No vaginal issues.