Food and headache

Is there a connection between food and headache and how to understand what you need to eat