I would say that you need to find a way to stop or lessen the headaches. I used to get migraines and can't imagine working out through them!
Here is what helped stop my migraines
These three things I consider most important
Calcium 400-1200 mg a day
Magnesium 350 mg a day
Water 80-100 oz a day
I also take fish oil (5g), vitamin e 400 iu, a multivitamin, and ginger 1-4x a day (it helps with nausea and headaches).
Hope you are feeling better soon.
Long term dream goal