(the wife of the Prophet) Hamza bin ʿAmr Al-Aslami asked the Prophet, "Should I fast while traveling?" The Prophet ﷺ replied, "You may fast if you wish, and you may not fast if you wish."
عَنْ عَائِشَةَ ؓ زَوْجِ النَّبِيِّ ﷺ أَنَّ حَمْزَةَ بْنَ عَمْرٍو الأَسْلَمِيَّ قَالَ لِلنَّبِيِّ ﷺ أَأَصُومُ فِي السَّفَرِ وَكَانَ كَثِيرَ الصِّيَامِ فَقَالَ إِنْ شِئْتَ فَصُمْ وَإِنْ شِئْتَ فَأَفْطِرْ