Is safe to take medecine about UTI during pregnancy ?

Liza

I am 11weeks and I just found out I have uti and she gave me medecine cephalexin 500 mg 4 days a day for 5 weeks. So do you think is safe during pregnancy Iam so scared to take it . Any advice please or someone had experience like that.