Thank you for posting your question here, I will answer it as best I can.
medications are contra indicated in pregnant women because they cause birth defects in the baby, as such I would recommend you avoid them.
Another common reason for having a headache during pregnancy
is a condition known as pre-eclampsia, in your blood pressure rises considerably.
So see your doctor so he can run some tests to check if you are indeed suffering from pre-eclampsia.
If you dont have it then you can consider taking medication like beta blockers or amitriotyline, both are relatively safe for use by pregnant women.
I hope this answered your question.