Solution:
You have to add bellow given commands in wp-config.php file of wordpress
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';
and make sure its pasted above the bellow line of code in wp-config.php file 🙂
require_once(ABSPATH . 'wp-settings.php');