Sunan Ibn Majah, Volume 2, Book 7, Hadith 1668 (DarusSalam)

It was narrated that Anas bin Malik said: “The Messenger of Allah granted a concession to pregnant women who fear for themselves, allowing them not to fast, and to nursing mothers who fear for their infants.”

حَدَّثَنَا هِشَامُ بْنُ عَمَّارٍ الدِّمَشْقِيُّ، حَدَّثَنَا الرَّبِيعُ بْنُ بَدْرٍ، عَنِ الْجُرَيْرِيِّ، عَنِ الْحَسَنِ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ رَخَّصَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ لِلْحُبْلَى الَّتِي تَخَافُ عَلَى نَفْسِهَا أَنْ تُفْطِرَ وَلِلْمُرْضِعِ الَّتِي تَخَافُ عَلَى وَلَدِهَا ‏.‏

sunnah.com