Sahih al-Bukhari, Book 21, Hadith 18 (Bukhari 1177)

Narrated Anas:

The Prophet (ﷺ) said, "Whenever anyone of you is in prayer, he is speaking in private to his Lord and so he should neither spit in front of him nor on his right side but to his left side under his left foot."