wp_guess_url working without SSL, in turn $_SERVER[‘HTTPS’] = ‘on’; in wp-config

A few days ago I try it asking this question here, but then I got minus points, this is very much wordpress issue:
I launch a multisite and using this in my wp-config.php:
if (isset($_SERVER[‘HTTP_X_FORWARDED_PROTO’]) && $_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’)
$_SERVER[‘HTTPS’] = ‘on’;

Everything is okay, but when a user create a new site, of this new site’s has default Siteurl and Home settings with http:// … So I need manually rewrite these options in network_home/wp-admin/network/site-settings.php.