When I am fasting I have found that taking a saline solution cleansing enema every day helps prevent and relieve headaches.
It's easier if you're not at work when you begin to feel the onset, but you may want to try a daily enema in the morning before leaving for work, just be sure to leave enough time on the toilet to be sure it's been completely eliminated!