According to Srimad Ramayana it was Lord Indra, who gave a boon to Sri Hanuma that death occurs only by his own volition - स्वच्छंदतः च मरणम् , but not Sri Rama.
वज्रस्य च निपातेन विरुजम् त्वाम् समीक्ष्य च | सहस्र नेत्रः प्रीत आत्मा ददौ ते वरम् उत्तमम् || ४-६६-२८ स्वच्छंदतः च मरणम् तव स्यात् इति वै प्रभो |
"On scrutinising that you are unhurt even after hit by Thunderbolt, oh, ablest Hanuma, the Thousand-eyed Indra kind-heartedly gave you a choicest boon saying that your death occurs only by your own volition..."
Srimad Ramayana clears says that death will come to Sri Hanuma on his own volition, but did not say Sri Hanuma is Chiranjeeve - who lives for eternity.
My question is then why was the notion that Sri Rama Gave him a boon that as long as his Story is sung, Sri Hanuma will be alive?
What is the basis of this story? In which Purana was it mentioned? Can anybody tell me?