In DN 1, the Buddha says:
“If, bhikkhus, others speak in dispraise of me, or in dispraise of the Dhamma, or in dispraise of the Sangha, you should not give way to resentment, displeasure, or animosity against them in your heart. For if you were to become angry or upset in such a situation, you would only be creating an obstacle for yourselves. If you were to become angry or upset when others speak in dispraise of us, would you be able to recognize whether their statements are rightly or wrongly spoken?”
“Certainly not, Lord.”
“If, bhikkhus, others speak in dispraise of me, or in dispraise of the Dhamma, or in dispraise of the Sangha, you should unravel what is false and point it out as false, saying: ‘For such and such a reason this is false, this is untrue, there is no such thing in us, this is not found among us.’