They were so inbred they all had the same allergies
Joke aside, in Feudal Japan and in Imperial China they were well aware of food allergies. They didn't know what caused them but knew about them. Then again, they dealt extensively with seafood and other cullinary unholly stuff.
In the Japanese movie "
Love and Honor" a food taster almost dies because the chef prepared shellfish that was "out of season". This stuff is so tricky it is naturally poisonous at specific times of the year.