I have new daily persistent headache, a type of chronic headache, so I have bad headaches 24/7. Lucky for me, exercise is the only thing (with alcohol) that actually offsets my headache, so I don't notice it in the gym, and if I had my way, would be in the gym every minute of the day or partying drunk (yeah I know, not exactly compatible aspirations, and I am smart enough to prioritize the former).
I could see how this could kill your progress - the headaches have certainly killed my once very promising legal career.
My advise is its probably vascular given its exacerbated by exercise. Consider anti-migraine drugs. There are 3 main classes, none of which have helped me, but I can tell you the side effects I've experienced (my condition is the hardest to treat - yours may not be)
(1) beta-blockers: AVOID!!!!!!!!!!! these may you drowsy, feel tired, weak, etc, and made me gain weight as I couldn't exercise.
(2) tri-cyclic anti-D's: these had only minor side effects, because your not taking the anti-D dose. The 2nd time I tried these I had no sides.
(3) anticonvulsants such as valproic acid and topiramate: valproic acid had no sides, topirametes make you feel a bit dumber in my experience, but this tends to disappear after about 4 weeks as a side. They often make people lose weight as sugar starts to taste funny.
I would as last resort take an anti-inflammatory pre-workout -I've heard this retards muscle growth significantly (although research this if your considering this option)
If your headaches is vascular, stims + exercise is probably a bad combo - get off any stims or nitric oxide.