Boy, I know what you mean about
detoxing being a full time job.
I know lots of us have headaches - they can be from a number of situations. The infections themselves (Lyme, Bart and Babs all have headaches as a symptom), toxins (I know you said you are detoxing, though), or even just stress.
The caffeine in coffee will constrict the blood vessels. My daughter uses coffee and aspirin to combat migraines if she catches them very early in the process (I can't have the caffeine, so I can't do that).
I'd be interested to hear what your doctor thinks though!