ERPNext 13.36.3 on AWS EC2 password reset email broken link

We have ERPNext 13.36.3 on AWS EC2
we are using a Gmail account for our emails. when I reset any user’s password, the user receives a link like
“http://%27http/update-password?key=xxxxxxx”
when user clicks the link user see
" Redirect Notice
The page you were on is trying to send you to an invalid URL."

email picture attached. how to solve it?

erpnext-email-broken