The Messenger of Allah ﷺ said, "When a man stands for prayer, or when one of you prays, he should not spit in front of him, nor to his right, but rather toward his left side if it is clear, or under his left foot, then rub it out with it."
حدثنا هناد بن السري عن أبي الأحوص عن منصور عن ربعي
قال رسول الله ﷺ إذا قام الرجل إلى الصلاة أو إذا صلى أحدكم فلا يبزق أمامه ولا عن يمينه ولكن عن تلقاء يساره إن كان فارغا أو تحت قدمه اليسرى ثم ليقل به
[Its isnad is sahih] Tirmidhi narrated it in the chapters on Prayer, in the chapter on the dislike of spitting in the masjid, hadith 571, and Nasai, hadith 727, and Ibn Majah, hadith 1021, from the hadith of Mansur through this route. Tirmidhi said, hasan sahih.