The Apostle of Allah (ﷺ) saw sputum sticking to the Qibla of the mosque. He scratched it off with a pebble and then forbade spitting on the right side or in front, but (it is permissible) to spit on the left side or under the left foot.
Reference: Sahih Muslim 548 a In-book : Book 5, Hadith 63 USC-MSA web (English) : Book 4, Hadith 1118 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.