How long have you been fasting? It’s normal to get headaches the first few days due to withdrawal from caffeine and sugar. I got horrible headaches the first 4 days when I was fasting and nothing I did worked to relieve them. I was expecting to get headaches but one I got was so bad I went to bed with it and when I got up the next morning it was gone. You might try to put a cold cloth on your forehead and lay down. Someone told me to apply peppermint oil to my temples and the headache would lessen but I didn’t do that because I wasn’t sure if my skin should be absorbing oil while I was fasting. Maybe someone here could tell us if that would have been ok.
The good thing about it is the headaches don’t last more than a few days, once your brain figures out your not going to feed your body caffeine and sugar, so if you can get through it you’ll be headache free. Good luck with your fast.