I guess I'd start with gluten or dairy & then follow with the other, if necessary. Some people get headaches from chocolate, cheese, wine, etc - but those should be easier to pinpoint since people don't usually eat those things every day..
I used to get very frequent headaches as a child - about 3-4 a week which almost always ended in vomiting from the pain. I don't know what my trigger was then, but I know that I ate MSG & obviously had no idea what it was back then.
I've had a few ocular migraines as an adult that I could have sworn were another case of meningitis - they were that bad.
Aside from those, I would get headaches a few times a week & take ibuprofin at the first sign because if I let it go too far, once I got to a point, there was no turning back from it ending up with vomiting, a dark room & silence.
I haven't had a headache in a very long time now. Early this summer I decided to try to stay really hydrated. (I had also eliminated gluten about a year before.) I still had headaches w/o the gluten (but did have relief from other problems after removing the gluten) & still took ibuprofin.
I don't know exactly what happened. I drank a lot of water for a couple of weeks, didn't have headaches & didn't take ibuprofin. I'm aware of rebound headaches (from pain relievers), but I don't think that was the problem because I wasn't taking ibuprofin for days in a row. Maybe I flushed a bunch of toxins out?
Magnesium could also help your friend. Sometimes if Dd1 has a headache, I'll give her a lot of magnesium every hour or so & it relieves it. Especially if it's a tension headache.
Other triggers could be birth control, anti-depressant drugs, allergy medications, etc.