It's can be occurs due to spicy food cause when you take spicy food that food cause irritation to some nerve and take nerve associated with nerve of skull so pain can be occurr for a very short period.
When pain again and again occurr then you should take consultation from a doctor.
Next Steps
You should take less spicy and fatty food
you should take sufficient amount of water.
Health Tips
please keep positive attitude to fight and disease and any problem of your life .